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 »

Hi DavidIQ, have a look at this excellent post from Stackoverflow that will give you some more info: How do I “think in AngularJS” if I have a jQuery background

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

Re: AngularJS for phpbb

Post by DavidIQ »

Well I'm not sure we would completely replace jQuery with AngularJS simply because jQuery is more widely known and used. It's not just a matter of phpBB itself using it but of giving MOD/Extension authors something they already know without throwing even more things into the mix of what they need to study and learn for 3.1. jQuery sort of lightens the load.

If they can both coexist then it might be fine for the core to use this in maybe 3.2.
Image

Alien_Time
Registered User
Posts: 165
Joined: Fri Apr 05, 2013 3:38 am

Re: AngularJS for phpbb

Post by Alien_Time »

yeah.. thats fair enough.. But if Angular does get included in core, then MOD / Extension authors will still need to learn a bit of Angular even if they want to use Jquery instead of the Angular way for some methods. Reason being, doesnt matter what is done using jquery, its still going to be Angular that is going to process and show the right contents in the end. Unfortunately, this requirement will still be there. It will be hard to create ext only using jquery and not knowing Angular at all if phpbb uses Angular in core. So I agree, there will be a learning curve..

Alien_Time
Registered User
Posts: 165
Joined: Fri Apr 05, 2013 3:38 am

Re: AngularJS for phpbb

Post by Alien_Time »

DavidIQ wrote:If they can both coexist then it might be fine for the core to use this in maybe 3.2.
Also not to be misunderstood here. When I say Angular and Jquery can coexist, it doesnt mean you can choose either to use Angular or Jquery. What will happen is, Angular will be the one doing all the things but jquery (or other libraries) can be used along with it. Not sure if I have poorly worded it. Hope it makes sense.. :)

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

Re: AngularJS for phpbb

Post by brunoais »

Alien_Time wrote:
AngularJS is a toolset for building the framework most suited to your application development.
Alien_Time wrote:
application development.
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.
Alien_Time wrote:Hi DavidIQ, have a look at this excellent post from Stackoverflow that will give you some more info: How do I “think in AngularJS” if I have a jQuery background
It's as I usually say. Even with its quirks, the DOM is way easier than any framework you snap on top of it. If you need something to normalize DOM access, use a lib like Mootools or jQuery or whatnot. Frameworks are usually a PITA (forgive the term but I don't really know how to express if I don't use it). They have an insanely huge list of functions/methods, they act on their own (unpredictable from our code standpoint (though probably not from the system architecture)) and they sometimes hide so much that it is impossible to understand what exactly is happening there.

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

Re: AngularJS for phpbb

Post by callumacrae »

Progressive Enhancement is Dead—and that was published a while back.

The old browsers and screen readers aren't valid anymore. The old browsers support JavaScript. Screen readers support JavaScript. Phones support JavaScript.

That said: Angular, while pretty nice (I've used it extensively in a few projects recently), is not really suitable for phpBB: it would involve rewriting absolutely everything. Also, it doesn't work with search engines yet unless you prerender server-side or use a service like prerender.io. So, it's nice, but not really suitable for phpBB.
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?
Made by developers, for developers!
My blog

Alien_Time
Registered User
Posts: 165
Joined: Fri Apr 05, 2013 3:38 am

Re: AngularJS for phpbb

Post by Alien_Time »

valid point callumacrae.. I understand what you mean and I dont think we can change phpbb into Angular completely (atleast for now). But what I was thinking was maybe instead of turning phpbb completely into Angular, we can perhaps have certain sections into angular. Meaning the Ucp section, MCP, posting page, memberlists, login and register pages, ACP pages and so forth can be Angularized with intuitive ui and leave the forum index page, topic page and forumlists the way it is. We are basically separating it into 2 types (1) Pages that involves User Interactions with good UI and (2) Pages that lists the forum contents like forums, topics, news, etc.. It will also be a good idea in seo perspective since this wont affect the main contents and we don't really need to worry about seo for Ucp, ACP etc.. which should be more ui oriented. This might be better and easier than a complete re-write too. The reason I am recommending angular over jquery is mainly due to simplicity in number of codes it takes to actually do the same in jquery, easily testable and also prevents from having a bloated messy spaghetti codes with various jquery plugins to do different ajaxy tasks. Also the MVC approach and the way Angular makes you to separate logic and templates encourages good programming practices and sets the platform for developing a good architecture in the future. This will have a long term benefit. So the question is, would something like this be possible?

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: AngularJS for phpbb

Post by Pony99CA »

callumacrae wrote:Progressive Enhancement is Dead—and that was published a while back.
I wasn't quite sure what "progressive enhancement" meant (neither you nor the article defined it), but I got the idea after reading that Sigh JavaScript blog. For others who don't know, it refers to sites that work well with CSS and/or JavaScript turned off and get progressively better as you enable them.

However, why should we take that one article for fact, especially when another person (who the article is rebutting) disagreed? I've never heard of either of those people, so I don't recognize them as experts, so you haven't proven your case.

And since when is September 2013 considered "a while back"? When you said that, I was thinking before 2010. By that standard, phpBB 3.0 was released in the stone age. :lol:

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

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

Re: AngularJS for phpbb

Post by callumacrae »

Pony99CA wrote:
callumacrae wrote:Progressive Enhancement is Dead—and that was published a while back.
I wasn't quite sure what "progressive enhancement" meant (neither you nor the article defined it), but I got the idea after reading that Sigh JavaScript blog. For others who don't know, it refers to sites that work well with CSS and/or JavaScript turned off and get progressively better as you enable them.

However, why should we take that one article for fact, especially when another person (who the article is rebutting) disagreed? I've never heard of either of those people, so I don't recognize them as experts, so you haven't proven your case.
It's one of many articles about it! Realistically though, progressive enhancement is allowing people who are scared of JavaScript for reasons never entirely explained (adverts can be dealt with using Ghostery and something like Adblock Plus, the security argument is bull, the support argument is outdated) to hold the web back.
Pony99CA wrote: And since when is September 2013 considered "a while back"? When you said that, I was thinking before 2010. By that standard, phpBB 3.0 was released in the stone age. :lol:
Front-end development :-)
Made by developers, for developers!
My blog

User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: AngularJS for phpbb

Post by PayBas »

callumacrae wrote:It's one of many articles about it! Realistically though, progressive enhancement is allowing people who are scared of JavaScript for reasons never entirely explained (adverts can be dealt with using Ghostery and something like Adblock Plus, the security argument is bull, the support argument is outdated) to hold the web back.
People without JS can GTFO as far as I'm concerned, exactly for the reasons that article mentions.

Post Reply