Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zoomerang
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
zoomerang
12y ago
Angular has directives, which are used to make encapsulated reusable components. First up - React.js components are substantially better than Angular directives for this purpose, but the design of applications in Angular are generally not b
32.
▲
by
zoomerang
12y ago
I'd agree, except that I consider the level of granularity to be too fine the way React does it, resulting in too much boilerplate to do simple things.
33.
▲
by
zoomerang
12y ago
Yep - JSX solves many of those complaints. (My post was more of a reaction to the 'templates are bad' tone than React itself). I'm not a fan of JSX as a templating language, but it's good enough. I still feel that React
34.
▲
by
zoomerang
12y ago
I agree very strongly, but I can understand the opposite viewpoint. For me, I like to write HTML in HTML. While I'm primarily a backend programmer these days, I've spend a considerable portion of my career writing HTML, so I'
35.
▲
by
zoomerang
12y ago
Sure, but that's not idiomatic Angular. I'd wager the majority of Angular projects don't even use custom directives.
36.
▲
by
zoomerang
12y ago
Angular does mix HTML and presentation logic. That's the point, and this is desirable. Angular does not mix Presentation and Business logic. React doesn't inherently mix the two, but it doesn't dissuade it either. > Th
37.
▲
by
zoomerang
12y ago
You can cheat in any framework. The difference is that angular strongly encourages you towards one design, whereas React.js does not. (Directives are also not part of your normal daily workflow. Many projects wouldn't even use them).
38.
▲
by
zoomerang
12y ago
More a distaste with the design pattern of mixing HTML and Logic in one monolithic codebase. (i.e. lack of proper separation of concerns) Forcing a clear separation leads Junior developers towards a better design, which is one of the reason
39.
▲
by
zoomerang
12y ago
If you can solve something in jQuery, why are you using Angular? Wrong tool for the job. If you have an application that otherwise uses Angular, and you have a snippet of jQuery code that you want to use, wrapping it in a directive takes ab
40.
▲
by
zoomerang
12y ago
The Angular guys aren't missing the point. I think it's the other way around. People see the word "Factory" and for some reason assume that it's somehow a Java enterprise bloatware feature. Nevermind that "Fact
41.
▲
by
zoomerang
12y ago
I love Angular for exactly that reason. My HTML template should be a HTML file. I cannot stand codebases that mix code and markup together.
42.
▲
by
zoomerang
12y ago
I've been running a 256gb SSD in my Macbook and haven't come remotely close to hitting that limit. In my case it's my secondary computer, so I don't see a need to store much in the way of media (Movie, Music) etc on it,
43.
▲
by
zoomerang
12y ago
I think you misunderstood my post. By 'app', I mean the app built by a third party company that makes use of OSM. Being a contributor is nice and fuzzy, but not a commercially viable option. If my customer says "I can't
44.
▲
by
zoomerang
12y ago
And therein lies the problem. For some areas of the world OSM data is excellent. But the internet is global. It might work correctly for you when testing, but somebody in another country finds your app utterly useless. Even if Google Maps h
45.
▲
by
zoomerang
12y ago
Callbacks seem simpler in a lot of these examples because they aren't really showing the power of promises. Promises allow you to chain much more complex flows of information together in a way that would result in a mess of spaghettico
46.
▲
by
zoomerang
12y ago
Outside of the US, OSM is almost completely useless. I live in a major Australian capital city, and there's vast areas of the city without any geocoding information at all. If you just want to display a vague map of a major metropolita
47.
▲
by
zoomerang
12y ago
Google Maps has no free tier for commercial use. I've been involved in negotiations with Google for their mapping service. I can't give specifics, but will say we settled on another commercial service that was two orders of magnit
48.
▲
by
zoomerang
12y ago
It's pretty easy to implement such a feature in any strongly typed language, but sadly few framework/libraries/stacks actually do it.
49.
▲
by
zoomerang
12y ago
Not to mention Python and Ruby.
50.
▲
by
zoomerang
12y ago
Look a little closer - It's not about saving bytes. I ended up coming up something very similar for my projects and it made a notable difference in defect rate. - Removes the need for positional arguments for constructor injection, so
51.
▲
by
zoomerang
12y ago
It's just another annoying thing on the list of warts with Javascript that make maintain a large codebase a pain in the arse. Plenty of third party implementations is half the problem. Want to import a module by somebody using a differ
52.
▲
by
zoomerang
12y ago
> Also, a large codebase can be very easily maintainable with tightly coupled components Agreed, but having worked on large codebases it's usually easier to plan ahead and decouple from the start - it can be hard to decouple compone
53.
▲
by
zoomerang
12y ago
> functional programming. That's not functional programming.
54.
▲
by
zoomerang
12y ago
I agree with you for the most part - what you're describing is rampant abuse by cargo-code programmers that don't know better. This doesn't mean GoF design patterns are specifically wrong. It's just that they are misused
55.
▲
by
zoomerang
12y ago
You've never found the need to decouple components?
56.
▲
by
zoomerang
12y ago
You're completely missing the point and solving the wrong problem. Function or class, its a minor semantic difference for the same thing. The issue is not how you define your factories, it's how you pass them around and use them i
57.
▲
by
zoomerang
12y ago
Saying "OO is Evil" is the flavour of the month. Functional Programming is the new cool kid on the block. This would, in theory, be a good thing. Unfortunately legions of Javascript fanboys have recently noticed that they don'
58.
▲
by
zoomerang
12y ago
Whether you use OO, Procedural, of Functional programming, you're still going to end up with some variant of IoC in order to keep your abstractions clean.
59.
▲
by
zoomerang
12y ago
Thank you! I came here to say this, but you said it a lot more politely than I would have. There's a lot of hate for certain design patterns because they are seen to introduce too much complexity or boilerplate in small projects - but
60.
▲
by
zoomerang
12y ago
What does your example have to do with functional programming? You've written two factories, pretty much exactly how AngularJS uses them, in an imperative style. Regardless of which, this doesn't in any way solve the issue Angular
More ›