
I Was Afraid of Angular.js Because it Reminded me of Drupal - lxbarth
http://daemon.co.za/2014/03/angular-reminded-me-of-drupal/
======
ilaksh
If you can't use Web Components (Polymer) then Angular is the next best thing.
I think you should really try to use Web Components though if you can get away
with it.

IMHO Angular is overly complicated once you try to dig in, for example to make
your own HTML elements.

Building custom elements with Web Components/Polymer is the next step, along
with promoting web components/polymer and working on getting compatibility in
user's browsers.

People say its not ready for mainstream, which is true. _However_, if we all
start taking Polymer/Web Components seriously, pretty quickly it _will_ be
ready, i.e. it will work in new releases of Firefox, Chrome and probably
Safari. And even IE 10 and 11. We just need people to start seriously trying
to take advantage of it, patching things and pushing for
compatibility/stability/adoption.

And someone might say something like "I think you are confused about what
Angular and Web Components do.. blah Angular is going to take advantage of Web
Components in the near future". So let me save you the lecture.

I have used Angular in 3 or 4 projects. I know what it does. I know it is
going to use Web Components in the future.

But like I said, its too complicated. And most, if not all, of the things that
you would do with Angular with/without using custom elements, you can take
advantage of Polymer/Web Components features to do. And it will be much
simpler to code and maintain, and not particular to any overall framework.

So as far as I'm concerned Angular is superfluous at this point, and a
liability, if I am not constrained by immediately shitty browser realities.

If there is something that Angular does that can't be implemented with Web
Components/Polymer, please let me know.

~~~
AdrianRossouw
Have you seen this presentation the [1] angular devs gave? A lot of the
concepts are pretty analogous to each other, and I think they will possibly
start moving towards that standard.

Not soon though, that is up to browser makers.

Angular is close enough tot he general idea though, that I think it's proving
the approach is valid to an entire generation of devs. Devs who would never
have known about web components if angular wasn't legitimising it.

[1] [https://docs.google.com/presentation/d/1Gv-dvU-
yy6WY7SiNJ9QR...](https://docs.google.com/presentation/d/1Gv-dvU-
yy6WY7SiNJ9QRo9XayPS6N2jtgWezdRpoI04/present)

~~~
ilaksh
OK thanks, no I have not seen that.

What is left for Angular to do? Really would like to know the answer to that.

If they are serious about helping move the web forward, they will just change
the Angular logo to the Polymer logo and start pushing to make that work. And
stop saying things like browsers aren't ready.

Polymer works in new versions of Firefox, Chrome and IE. We don't need a new
version of Angular.

If someone thinks we need to keep using Angular, give me a reason. That
presentation on Google Docs that is linked in the parent just shows reasons
for Angular to go away.

~~~
AdrianRossouw
they aren't ready. the standards aren't even ready for polymer to polyfill for
the browsers to implement.

you need to be patient. open platforms are a very long term play.

i saw they reviewed a few of the polyfills for 2.0 inclusion, and there wasn't
a lot that was really capable of being used yet, for a variety of reason.

I believe open platforms will win eventually, but it's not going to be
tomorrow. it will be maybe 5-10 years from now. Just be glad there's movement.

~~~
ilaksh
10 years from now, we may not even be relevant as a species. I'm not kidding.
Its unlikely it will happen that soon, but I actually believe that we will
have super-intelligent AI within 4 decades at the latest. I think it is
entirely within the realm of possibility for that to happen within 10 or 15
years.

I am looking at next year or maybe the year after that to see a massive surge
in popularity and use of Polymer.

------
AdrianRossouw
This is the 4th and final installment on my series of posts about why I needed
to build something in angular to test my intuition.

> i was wrong to be afraid of angular.js

[1]
[https://news.ycombinator.com/item?id=7384937](https://news.ycombinator.com/item?id=7384937)

> Why I was Wrong to be afraid of Angular.js

[2]
[https://news.ycombinator.com/item?id=7394959](https://news.ycombinator.com/item?id=7394959)

> Complexity Creeps: Why I'm Concerned for the Future of Angular

[3]
[https://news.ycombinator.com/item?id=7417667](https://news.ycombinator.com/item?id=7417667)

~~~
AdrianRossouw
and the 2 posts (so far) of supplemental .. err theory?

> Simple and easy, a vocabulary for describing software complexity

[http://daemon.co.za/2014/03/simple-and-easy-vocabulary-to-
de...](http://daemon.co.za/2014/03/simple-and-easy-vocabulary-to-describe-
software-complexity)

> How complexity affects your software

[http://daemon.co.za/2014/03/how-complexity-affects-
software](http://daemon.co.za/2014/03/how-complexity-affects-software)

------
dalek2point3
Oh man, I remember those days when the Wordpress vs/ Drupal vs. Joomla war was
still in its infancy. Drupal was always soo yucky in terms of UX even though
it was waay more powerful than wordpress. WP seems to have essentially won
that war. Wonder why? Something similar happening the .JS world? Not really my
cup of tea.

~~~
mantrax3
It's simple.

Let's see what the spectrum of PHP solutions is. It goes from:

\- WordPress: very simple, you don't need to be a coder, not that powerful.

And goes until:

\- PHP + libraries: complicated, you need to be a coder, extremely powerful.

And here's Drupal:

\- Drupal: a lot more more complicated than WordPress, not that much less
complicated than plain PHP, yet much less powerful than plain PHP.

In a nutshell, Drupal and apps like it want to be everything to everyone, and
that's how bad apps happen.

WordPress may suck, but it has focus, and people with simple needs like the
proposition.

~~~
TylerE
Honestly, your characterization of Drupal is just plain BS, and I say that as
someone who worked on Drupal sites for about 5 years, and am glad to no longer
be.

To say it's less powerful than "plain PHP" is just wrong, since via custom
modules, which you'll be writing at least a half dozen of for a real non-
trivial (e.g. the kind of thing you wouldn't just do in WP, just you can
essentially just sprinkle in 100% custom "plain PHP" whereever you need it,
while still being able to leverage things Drupal does right, like form
handling and batch operations.

~~~
derefr
That is a total mischaracterization of what it means for a language or DSL to
be "powerful." When you are writing not-X to assist X in doing Foo, that
doesn't mean X is powerful-enough to let you do Foo; that means that X _isn
't_ powerful-enough to let you do Foo _without breaking out of X._

To put it another way: the fact that you can greenspun Lisp in C doesn't mean
C has all the power of Lisp. It means that _Lisp_ has all the power of Lisp.
Every even-mildly-useful language is Turing-complete; so, in order to be able
to give a ranking to languages _at all_ , we have to restrict our discussion
of a language's merits to its merits _if you aren 't just using it as a
glorified Turing machine for implementing a different language._

Without writing custom PHP, Drupal is less powerful than PHP. That's perfectly
okay.

~~~
AdrianRossouw
It's called the inner-platform effect.

[http://en.wikipedia.org/wiki/Inner-
platform_effect](http://en.wikipedia.org/wiki/Inner-platform_effect)

DSL's are generally not turing complete. When they are, they tend to look more
like lisp.

~~~
TylerE
I don't think so, since Drupal does many things that vanilla PHP is actually
quite poor at - like getting away from the whole "each URL is a seperate file"
thing.

Also, Drupal is NOT a DSL, even in the way, say, Rails is.

~~~
AdrianRossouw
that has nothing to do with drupal or php.

drupal uses an apache config hack to rewrite the urls.

~~~
AdrianRossouw
i'm going to respond to the sibling in here because I don't want it to get
more nested. I also suspect it might be downvoted. (as some of your others
have been)

I'm _intimately_ familiar with the feature. That feature came in with Drupal
4.2.0 back in december of 2001, which was the second Drupal release I deployed
a site on. It was also the first Drupal release to include any of my own code.

[https://drupal.org/drupal-4.2.0](https://drupal.org/drupal-4.2.0)

Back in the day the only way to get anything committed was to roll a patch and
commit it to a special cvs repository, manually numbering it. then you had to
mail the dev list with the name of the patch so you could discuss it, and then
if it still applied dries committed it.

I tried finding the mails on gmane, but the repo itself and the emails seem to
cut out before.

So while q?= was considered an acceptable fallback, and it was still cleaner
than what we had before ... this feature has always explicitly been about
supporting url rewrites.

This is me : [https://drupal.org/user/1337](https://drupal.org/user/1337)

When I built bryght.com, my first startup in 2004, trying to be the
wordpress.com of drupal, before wordpress.com was a thing : I had to make sure
this worked with it.

When I wrote Aegir, a distributed turn-key automated hosting platform for
Drupal sites, I had to write the logic that made sure this stuff worked. I did
that for apache, and with some help from omega8.cc, nginx.

Please don't try to act like you're an expert on what 'design patterns' we
were implementing when we did that, because I'm telling your straight out now,
that wasn't why we did it.

I spent 9+ years of my life building major components of the system, and I'm
still really proud of all of it. Millions of people all over the world run the
software I helped build.

------
jbeja
I was afraid of angularjs because i was already very comfortable with jQuery
and realized that i don't need angular after all.

------
grumblestumble
Pretty much any conversation about AngularJS that gets stuck on "dirty
checking" makes my eyes glaze over. As for "black magic" DI, if you're
uncomfortable with a framework extending the basic language, it's perfectly
possible to do DI explicitly in Angular 1.2. This is a project-level choice.

~~~
AdrianRossouw
i was uncomfortable with the fact that it was being done in core, and I know
from personal experience that it will only take a good enough reason to do
something even dodgier with that type of thing.

my recommendation was that they remove it from core, and have it be opt-in
through the use of ngmin.

they are actually removing it completely from angular 2.0, so it's a moot
point really.

[http://daemon.co.za/2014/03/complexity-creeps-concerned-
for-...](http://daemon.co.za/2014/03/complexity-creeps-concerned-for-future-
of-angular)

I also stated that I was fine with the dirty checking, because it worked
better than it had any real right to. And best of all, it's only 'for now'

[http://daemon.co.za/2014/03/why-wrong-to-be-afraid-
angular](http://daemon.co.za/2014/03/why-wrong-to-be-afraid-angular)

------
ndesaulniers
I was afraid of angular.js because it reminded me of React, Ember, Backbone,
Meteor, [the MVC client side framework that JUST came out, oh, you missed
it?], [the 20+ other ones I've already forgotten about].

~~~
chenglou
React came out last year. Thanks for the compliment of thinking it's been
longer than it actually is =)

~~~
sehr
Core member? Great work you guys are doing there

------
Bahamut
I would compare Angular more to Symfony as far as PHP frameworks go -
complicated & arguably overengineered solutions, but extremely powerful and
conducive to good organization & modularity.

------
kawliga
Drupal is truly the forbidden doughnut.

I too felt the exact same way when looking at AngularJS. It seemed as though I
could spend a year learning/perfecting my skills with it... only to be let
down in the end.

------
MartinMc12
I was in the same position as u but I really started to like it.

------
PostGreHipster
No way. Tear through some Drupal core code and you'll be dizzy, and it's
pretty much always been that way. Angular takes a much more simple approach
(for now). It really cuts down the amount of code you have to write, unless
you really want to.

~~~
AdrianRossouw
yeah, but i saw storm clouds.

i've seen how stuff changes over time, it makes me aware of this stuff.

Drupal wasn't always that complex either. I think i'm probably culpable. I
identified the point where I complected Drupal and set it on this direction,
but that's another article for another time.

~~~
jrochkind1
> _I identified the point where I complected Drupal and set it on this
> direction, but that 's another article for another time._

I would _really_ like to see that article. Because, I too have been involved
in such things, several times, but have not managed to identify exactly where
we went wrong (or even convince others that we were going wrong :) ). I think
figuring out how to avoid that kind of complexity is one of they key
challenges of certain kinds of software these days.

(For instance, some people think Rails has already jumped that shark, some
people don't, but I'm not sure even the people who think it has become
complectified all agree on when it happened and how it could have been
avoided. When I see people starting something new that's supposed to be "like
Rails, but without all that needless complexity", I just think, sure, Rails
started out simpler than today's Rails too, and you'll end up in the same
place (or worse) unless you can come up with an understanding of what went
wrong other than "Those other people made bad decisions I would never have
made because I'm a better coder", nope, that's not what happened.).

~~~
AdrianRossouw
you should really read the simple and easy vocabulary guide. It's part of a
set of notes about a talk by the author of clojure.

I took so long to get the fourth in this series finished because i needed to
get the necessary theory out there first.

[http://daemon.co.za/2014/03/simple-and-easy-vocabulary-to-
de...](http://daemon.co.za/2014/03/simple-and-easy-vocabulary-to-describe-
software-complexity)

~~~
jrochkind1
Yeah, I took a look at that when I saw you link to it initially, and will try
to find time to read it more carefully and watch the presentation.

I still think actual concrete examples from real world projects would be
great. (Maybe the presentation has some).

(That's what I initially thought the 'Beautiful Code' book would be about, but
it looked like more about algorithmic cleverness than success in architecting
simplicity. Which is good too, but many of us spend a lot more time struggling
with the challenges of architecting simplicity)

