AngularJS for phpbb

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Alien_Time
Registered User
Posts: 165
Joined: Fri Apr 05, 2013 3:38 am

Re: AngularJS for phpbb

Post by Alien_Time » Wed Apr 09, 2014 1:36 pm

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?

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: AngularJS for phpbb

Post by DavidIQ » Wed Apr 09, 2014 2:24 pm

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 ;-)
Image

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: AngularJS for phpbb

Post by brunoais » Wed Apr 09, 2014 6:55 pm

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.
callumacrae wrote:
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.
You must really hate web components! It's like the www has changed since it was invented. Scary stuff, huh?
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. :)

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!
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 ;-)
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.

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: AngularJS for phpbb

Post by callumacrae » Thu Apr 10, 2014 7:47 am

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.
I was linking to the article, not the website. Try any of these: http://builtwith.angularjs.org/

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. :)
It has come already.
Made by developers, for developers!
My blog

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: AngularJS for phpbb

Post by brunoais » Thu Apr 10, 2014 8:22 am

callumacrae wrote:
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.
I was linking to the article, not the website. Try any of these: http://builtwith.angularjs.org/
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...
callumacrae wrote:
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. :)
It has come already.
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).

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.

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: AngularJS for phpbb

Post by callumacrae » Thu Apr 10, 2014 5:14 pm

brunoais 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...
That's an opinion ;-)
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).
Or right click -> inspect element. Isn't that the same with adding event listeners to elements by classname, though?
Made by developers, for developers!
My blog

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: AngularJS for phpbb

Post by brunoais » Fri Apr 11, 2014 2:37 pm

callumacrae wrote:
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).
Or right click -> inspect element. Isn't that the same with adding event listeners to elements by classname, though?
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.
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

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: AngularJS for phpbb

Post by callumacrae » Fri Apr 11, 2014 10:26 pm

brunoais wrote:
callumacrae wrote:
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).
Or right click -> inspect element. Isn't that the same with adding event listeners to elements by classname, though?
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.
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
Using IDs doesn't sound very reusable, and extremely fragile!

Also, http://blog.methvin.com/2013/12/please- ... abuse.html
Made by developers, for developers!
My blog

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: AngularJS for phpbb

Post by brunoais » Sat Apr 12, 2014 11:47 am

callumacrae wrote:
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
Using IDs doesn't sound very reusable, and extremely fragile!
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?
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)...
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 ;)).

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: AngularJS for phpbb

Post by callumacrae » Sat Apr 12, 2014 3:49 pm

brunoais wrote:
callumacrae wrote:
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
Using IDs doesn't sound very reusable, and extremely fragile!
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?
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:
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)...
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 ;)).
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.
Made by developers, for developers!
My blog

Post Reply