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

AngularJS for phpbb

Post by Alien_Time »

In one of the post by Exreaction, I came to realize that there may be a possibility of using AngularJS in the future. I havent found any RFC or discussions on this so here it is. Is this something that is considered? I see so much potential when using AngularJS with phpbb! It would work like an absolute charm. Some of the benefits these will give is:

1) There is no need to worry about the jquery Ajax features. Instead the Angular method will be so much easier to implement with a lot less lines of codes.

2) We can have the UCP, MCP and ACP completely Angular.

3) Posting, editing, and other tasks on topic pages can be easily completed just by changing the views using Angular Ajax and not needing to refresh the whole page completely.

4) Same goes for Login, search, etc..

There are so much more to it that we can use with this framework. I think instead of working on separate RFC for jquery Ajax, jquery login, etc.. we might be better of implementing Angular JS for client side in phpbb and then use that framework to implement everything else. This can be something that will take phpbb to the next level.

Your views?

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: AngularJS for phpbb

Post by EXreaction »

A proper API would be required before we can really use AngularJS. There is some work towards one, but in any case it's not going to be in 3.1.

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

Re: AngularJS for phpbb

Post by Alien_Time »

I understand that it is impossible for 3.1 for sure. But what I was thinking is, since there are many RFCs that may be added in the future (for 3.2, etc..) that may be affected if Angular was going to be added to the core at all. For instance, the jquery Ajax features that are planned to be added to the core. If AngularJS was adapted, then these needs to be re-written to Angular. Similarly the discussion on the new style (or prosilver redesigned) will also have an effect if the client side FW was changed. I am sure that are many more but these are 2 I can think of now. So I was wondering,

1) when would the process of going Angular will begin? (I understand right now release of 3.1 is the priority, but was wondering about the goal being set after that).
2) Has it been decided yet if Angular FW is going to be used or is it still being discussed by the developers?
3) If Angular is used, then what happens to the other planned RFCs that may be affected due to the change in framework?

I completely understand this is something that is far ahead in the future and I am curious (and excited) to know the stepping stones for this process. ATM I am on the process of learning Angular, and if this project is something that may be considered I may be interested to see how I can maybe contribute to this in the future.

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

Re: AngularJS for phpbb

Post by brunoais »

I never got to like AngularJS.
Every single website I went that was written with AngularJS in mind was completely broken when I arrived and the API is somewhat too abstract for my likes.
As long as sanity still stays including the graceful degradation....
I want to be able to fully use phpBB without any CSS and any js even if it is ugly looking, complicated and if I need to go through a longer route.
Same as being able to fully use phpBB without any js even if I need to go through longer routes in order to get what I want (slight longer routes for common operations like the topic navigation, making posts, etc...).

I'm not really ok with AngularJS but I accept it on phpBB due to the framework's popularity
Alien_Time wrote: 3) If Angular is used, then what happens to the other planned RFCs that may be affected due to the change in framework?
What change? phpBB, currently, does not use any javascript framework.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: AngularJS for phpbb

Post by EXreaction »

We'll decide if we want to use AngularJS or some similar framework with at least both of the following are done:
1. We have a good portion of a REST API completed.
2. We have decided to replace prosilver with a new style.

Until both of those are completed, we cannot make any preference towards AngularJS or something similar. Making any decision before than would be a waste of time because it's unlikely those will be completed for quite a while, at which point some other framework may have superseded AngularJS.


Brunoais, I'm aware there are people who prefer to have a functioning website while having CSS/JS disabled, however the number of people who prefer this is insignificant to those who otherwise are fine with it or do not know the difference. In my opinion, making the 1% of users happy while telling the other 99% that we can't do something they would prefer because a few users prefer something one other way is a very bad practice. We spend far too much time on supporting the far minority and we lose to our competition who actually is focused on using better and newer technologies.

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 »

I think that the idea is to make both groups happy by gracefully handlilng the lack of JavaScript. It may require more coding and testing to support people with JavaScript turned off, but it shouldn't be impossible.

The other alternative would be to keep a style around that didn't require JavaScript and have that be the default for people with JavaScript off.

I also have to wonder if blind people using screen readers can work with AJAX style sites. If they can't, graceful degradation would be a must for commercial sites required to support Section 508 in the U.S.

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.

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

Re: AngularJS for phpbb

Post by Alien_Time »

brunoais wrote:
Alien_Time wrote: 3) If Angular is used, then what happens to the other planned RFCs that may be affected due to the change in framework?
What change? phpBB, currently, does not use any javascript framework.
I was referring to the RFCs that are planned to be added to the core for 3.2 or later that depends on jquery and Ajax features. Those RFCs written on jquery will need to be re-written if another JS fw was adapted.

Regarding the javascript disabled users, by the time this gets implemented, I feel the number of users having js disabled will be so less that it would seem like a waste of time to work on supporting these very small number of people. Although I understand brunoais and Pony99CA view on this, but based on the development progress so far and the limited number of developers, working on more codings to support people with JS disabled shouldnt be a priority and this shouldn't halt the development of a JS framework.

Compared to all javascript FW I have come across, I find Angular's approach much better. It is getting better and due to the popularity and the attention it has been getting recently, I will be surprised if the development of this framework doesnt get even better in the future. The biggest benefit when using a JS fw for client side application is giving the users the maximum UI which seems like a necessity when looking from browsing point of view and also in terms of moving towards the future.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: AngularJS for phpbb

Post by EXreaction »

Pony, AngularJS does not degrade. You load an initial plain HTML page, then it loads additional content via JSON requests, so you'd see nothing useful and making it work without JS would be utterly impossible while still having any advantage that AngularJS provides.

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

Re: AngularJS for phpbb

Post by brunoais »

EXreaction wrote:Pony, AngularJS does not degrade. You load an initial plain HTML page, then it loads additional content via JSON requests, so you'd see nothing useful and making it work without JS would be utterly impossible while still having any advantage that AngularJS provides.
In that case, I'm against integrating AngularJS with phpBB.
  1. I want to be able to access and use phpBB from my phone or any phone I get that can read and process HTML.
  2. Many cell phones are being distributed with javascript turned off. I don't know if that trend is ever going to change but I don't think it's a good idea to support multiple styles for different hardware
  3. Even though javascript is potentially safe, there has been reports of security vulnerabilities in all browsers through the time made by javascript. They are not as popular as the flash ones (also because they are rarer) but they exist and they happen and they are explored. IE is the browser with the least vulnerabilities and see how hackers/crackers are able to find multiple vulnerabilities every month.
  4. Some websites add really annoying stuff to the DOM using javascript (includes ads) and they can make a website nearly unusable and night-unexittable(i.e. very hard to leave) (not as much anymore).
  5. Websites are not vulnerability-safe, same for phpBB. Even though it is hard, one can abuse and add javascript to the profile that executes malicious code to steal information. If a website does not seem "sane", I never turn js on there.
Those are the reasons I can remember now about why I still have a js blocker and why I still make websites that don't rely on javascript to deliver all functionality (even though for some it requires going through harder or more annoying routes).

@Alien_Time:
I will accept having js turned on all the time when:
  • It is mathematically proven that the js engine of my browser has 0 vulnerabilities.
  • Website owners are not going to make crazy stuff with js to annoy or distract me from what I want. Ads are ok as long as they are not that annoying moving thing on the webpage.
Pony99CA wrote:I think that the idea is to make both groups happy by gracefully handlilng the lack of JavaScript. It may require more coding and testing to support people with JavaScript turned off, but it shouldn't be impossible.
From my experience in my projects, it's actually easier without js but with js I can reduce the load on the server and deliver a more appealing UI.
Also, the added tests for "without js" (for all I developed so far) is nearly insignificant compared to the required tests for the "with js". It's a ratio of about extra ~5 mins for each hour testing with js (also because I only add the js after the HTML+CSS looks good.

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

Re: AngularJS for phpbb

Post by brunoais »

I've been doing (today) some research on AngularJS.
AngularJS is thought to develop applications in javascript. There can be a server involved to sync data and such but it is not meant for a front end of an application that is ran on the server (like phpBB is).

With that in mind, it is not only something I reject because it forces to have js only, it isn't even appropriate to use for phpBB's case as phpBB runs on the server, not on the client.

Post Reply