AngularJS for phpbb
-
- Registered User
- Posts: 165
- Joined: Fri Apr 05, 2013 3:38 am
Re: AngularJS for phpbb
Honestly I dont understand why some are still scared (or skeptical) of using Javascript in phpbb. How long is phpbb going to continue supporting really old browsers or the very small percentage of people who dont have Javascript enabled? This holds back productivity and progress big time. The things discussed in this topic is not something that can be released (if accepted) atleast for another 3-5 years easily. So when we are nearing 2020, are we still going to be worried about browsers without Javascript? How are we ever gonna move forward without worrying about supporting back dated browsers?
- DavidIQ
- Customisations Team Leader
- Posts: 1904
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: AngularJS for phpbb
Until 3.2? I thought that was made clear already... We obviously don't want to continue supporting old browsers indefinitely and really we aren't supporting some older browsers anymore plus we are already using JavaScript for quite a few things, which I'm not sure would work at all without JS being enabled
Re: AngularJS for phpbb
Why aren't websites like that, then?callumacrae wrote:prerender server-side or use a service like prerender.io
No js and al the basics work normally. I was able to read all the article, no problems with js turned off.
Actually, as long as it is simple stuff, navigating in that website with js off is fast! I click and I get a ready page in less than a second.
Meh... I'm not keen about that... When it comes... I'll try to understand it and, probably, accept it. I still need to see what exactly is it. Some resources already helped me getting an idea, though.callumacrae wrote:You must really hate web components! It's like the www has changed since it was invented. Scary stuff, huh?brunoais wrote:It is for a javascript application! PhpBB is not a javascript application. When I tried AngularJS it also feels like that.
I also forgot another thing I don't like about AngularJS. It breaks HTML. Every time I try to validate a page made using AngularJS it fails with a long list of HTML errors.
So it seems like websites are becoming a thing of the past and we are moving to web applications only, huh? What happened to fast websites? I mean... websites that load fast and are fast! frameworks on top of frameworks are ruining it.
Same happens when I use facebook, twitter or any of the "big guns". When I turn js off it still works! It has no interactivity but, tbh... I don't care. It's my decision to have js turned off, it has the minimal information and I can do enough with it off. That's perfectly fine by me.
BTW, http://css-tricks.com also loads perfectly fine.
As for progressive enhancement, just follow it without the need to be obsessive about it. As area51's phpBB is now, for me, is a correct way of having it. Basics work, js makes it such that not as much need for full page loads. Infinite scrolling using AJAX or running through pages using AJAX as an enhanced way of doing it? Great! Just leave those page buttons there!
phpBB still works without js. I can still do everything without js. Some things require me to take a larger route but if I turn js off, it's my choice and I pay for it by having to take the longer route.DavidIQ wrote:Until 3.2? I thought that was made clear already... We obviously don't want to continue supporting old browsers indefinitely and really we aren't supporting some older browsers anymore plus we are already using JavaScript for quite a few things, which I'm not sure would work at all without JS being enabled
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: AngularJS for phpbb
I was linking to the article, not the website. Try any of these: http://builtwith.angularjs.org/brunoais wrote: Why aren't websites like that, then?
No js and al the basics work normally. I was able to read all the article, no problems with js turned off.
Actually, as long as it is simple stuff, navigating in that website with js off is fast! I click and I get a ready page in less than a second.
It has come already.brunoais wrote: Meh... I'm not keen about that... When it comes... I'll try to understand it and, probably, accept it. I still need to see what exactly is it. Some resources already helped me getting an idea, though.
So it seems like websites are becoming a thing of the past and we are moving to web applications only, huh? What happened to fast websites? I mean... websites that load fast and are fast! frameworks on top of frameworks are ruining it.
Same happens when I use facebook, twitter or any of the "big guns". When I turn js off it still works! It has no interactivity but, tbh... I don't care. It's my decision to have js turned off, it has the minimal information and I can do enough with it off. That's perfectly fine by me.
BTW, http://css-tricks.com also loads perfectly fine.
Re: AngularJS for phpbb
Hum... I should have been more clear. I read the article and I used the website itself as an example of what I meant .callumacrae wrote:I was linking to the article, not the website. Try any of these: http://builtwith.angularjs.org/brunoais wrote: Why aren't websites like that, then?
No js and al the basics work normally. I was able to read all the article, no problems with js turned off.
Actually, as long as it is simple stuff, navigating in that website with js off is fast! I click and I get a ready page in less than a second.
It is an interesting thing but... Why would you need that?
The borders are well defined on the role of each of the 3.
HTML <- Answers the what. It deals with the content and what is being displayed.
CSS <- Answers the how. It does with how it is displayed.
JS <- Makes it all dynamic by changing the original HTML by adding and removing or showing and hiding nodes, make nodes follow the mouse (drag&drop), simplifying requests for small data, etc, etc, etc...
yes. I read it through a link in the article that you linked in the previous post.callumacrae wrote:It has come already.brunoais wrote: Meh... I'm not keen about that... When it comes... I'll try to understand it and, probably, accept it. I still need to see what exactly is it. Some resources already helped me getting an idea, though.
So it seems like websites are becoming a thing of the past and we are moving to web applications only, huh? What happened to fast websites? I mean... websites that load fast and are fast! frameworks on top of frameworks are ruining it.
Same happens when I use facebook, twitter or any of the "big guns". When I turn js off it still works! It has no interactivity but, tbh... I don't care. It's my decision to have js turned off, it has the minimal information and I can do enough with it off. That's perfectly fine by me.
BTW, http://css-tricks.com also loads perfectly fine.
That's a polyfill, though.
What I don't like is hidden stuff somewhere. I accept when I have a 1:1 translation and I have its translation. What I don't like is when I have something "that is something that... something" kind of thing. You look at it and you only know what it is by experimenting (not 100% true but I'd rather not write a wall-o-text).
EDIT:
Actually... It feels a lot like having an XML document with an xsl file to translate it to HTML for the browser to use. The differences are actually quite small even though they exist. The main concept, though, is still the same.
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: AngularJS for phpbb
That's an opinionbrunoais wrote:Hum... I should have been more clear. I read the article and I used the website itself as an example of what I meant .
It is an interesting thing but... Why would you need that?
The borders are well defined on the role of each of the 3.
HTML <- Answers the what. It deals with the content and what is being displayed.
CSS <- Answers the how. It does with how it is displayed.
JS <- Makes it all dynamic by changing the original HTML by adding and removing or showing and hiding nodes, make nodes follow the mouse (drag&drop), simplifying requests for small data, etc, etc, etc...
Or right click -> inspect element. Isn't that the same with adding event listeners to elements by classname, though?brunoais wrote: yes. I read it through a link in the article that you linked in the previous post.
That's a polyfill, though.
What I don't like is hidden stuff somewhere. I accept when I have a 1:1 translation and I have its translation. What I don't like is when I have something "that is something that... something" kind of thing. You look at it and you only know what it is by experimenting (not 100% true but I'd rather not write a wall-o-text).
Re: AngularJS for phpbb
Yeah... I guess so. That's why I actively avoid it when possible without having to traverse the DOM too much. I prefer to place an id to the common(s) parent(s) DOM element(s) (usually just one but, sometimes, it does make sense to have many) and the event in that same element. The event object will have all the information I'm interested in, including the DOM element where the event happened.callumacrae wrote:Or right click -> inspect element. Isn't that the same with adding event listeners to elements by classname, though?brunoais wrote: yes. I read it through a link in the article that you linked in the previous post.
That's a polyfill, though.
What I don't like is hidden stuff somewhere. I accept when I have a 1:1 translation and I have its translation. What I don't like is when I have something "that is something that... something" kind of thing. You look at it and you only know what it is by experimenting (not 100% true but I'd rather not write a wall-o-text).
There are specific situations, though, where that is just impractical to do it that way (I'm sure it is way less than 1% of the situations where classes are used in javascript to locate DOM elements).
Besides, performance-wise, there's no better way than locating a DOM element using its id
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: AngularJS for phpbb
Using IDs doesn't sound very reusable, and extremely fragile!brunoais wrote:Yeah... I guess so. That's why I actively avoid it when possible without having to traverse the DOM too much. I prefer to place an id to the common(s) parent(s) DOM element(s) (usually just one but, sometimes, it does make sense to have many) and the event in that same element. The event object will have all the information I'm interested in, including the DOM element where the event happened.callumacrae wrote:Or right click -> inspect element. Isn't that the same with adding event listeners to elements by classname, though?brunoais wrote: yes. I read it through a link in the article that you linked in the previous post.
That's a polyfill, though.
What I don't like is hidden stuff somewhere. I accept when I have a 1:1 translation and I have its translation. What I don't like is when I have something "that is something that... something" kind of thing. You look at it and you only know what it is by experimenting (not 100% true but I'd rather not write a wall-o-text).
There are specific situations, though, where that is just impractical to do it that way (I'm sure it is way less than 1% of the situations where classes are used in javascript to locate DOM elements).
Besides, performance-wise, there's no better way than locating a DOM element using its id
Also, http://blog.methvin.com/2013/12/please- ... abuse.html
Re: AngularJS for phpbb
Why is that? Why aren't IDs something reusable and why are they fragile? They are the simplest way to find a specific DOM element in the whole DOM document. Am I missing something?callumacrae wrote:Using IDs doesn't sound very reusable, and extremely fragile!brunoais wrote:[...]
There are specific situations, though, where that is just impractical to do it that way (I'm sure it is way less than 1% of the situations where classes are used in javascript to locate DOM elements).
Besides, performance-wise, there's no better way than locating a DOM element using its id
That's about jQuery vs non-jQuery performance... Hum... I see I should have used a different jsperf, then... It wasn't my intention to use something to compare jQuery vs non-jQuery. My intention was just to compare lookups using id vs lookups using class (or whatever)...callumacrae wrote: Also, http://blog.methvin.com/2013/12/please- ... abuse.html
Anyway, about that article, it also displays one of the reasons I love jQuery as a library. It's because it allows the programmer to mix both DOM through jQuery and directly in very simple operations ($obj[0] returns the 1st DOM element, for example). It also mentions things that I expected considering how too many people think. They just don't get it and they don't even get to actually read jQuery's code... They just assume and want to point the finger for whatnot reason.
(That does not mean I prefer to use the DOM directly, though ).
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: AngularJS for phpbb
How are they reusable? You can only have one element of each ID per document. If you're calling multiple IDs it sort of defeats the point, and it also renders your performance argument invalid.brunoais wrote:Why is that? Why aren't IDs something reusable and why are they fragile? They are the simplest way to find a specific DOM element in the whole DOM document. Am I missing something?callumacrae wrote:Using IDs doesn't sound very reusable, and extremely fragile!brunoais wrote:[...]
There are specific situations, though, where that is just impractical to do it that way (I'm sure it is way less than 1% of the situations where classes are used in javascript to locate DOM elements).
Besides, performance-wise, there's no better way than locating a DOM element using its id
No, that article is saying that microbenchmarks are pointless. Your argument is that selecting by ID is 0.16667 microseconds faster… which to me, especially when it is only adding a single event, is pointless.brunoais wrote:That's about jQuery vs non-jQuery performance... Hum... I see I should have used a different jsperf, then... It wasn't my intention to use something to compare jQuery vs non-jQuery. My intention was just to compare lookups using id vs lookups using class (or whatever)...callumacrae wrote: Also, http://blog.methvin.com/2013/12/please- ... abuse.html
Anyway, about that article, it also displays one of the reasons I love jQuery as a library. It's because it allows the programmer to mix both DOM through jQuery and directly in very simple operations ($obj[0] returns the 1st DOM element, for example). It also mentions things that I expected considering how too many people think. They just don't get it and they don't even get to actually read jQuery's code... They just assume and want to point the finger for whatnot reason.
(That does not mean I prefer to use the DOM directly, though ).