My phone running the default Android 2.3.4 browser (which was crap on its own and is now extremely outdated) runs an application built with AngularJS without any problems.
Computers have security vulnerabilities. If you don't want to worry about that, don't use a computer, or at least not one connected to the internet (there are far worse things out there than what someone can do with javascript in a browser).
If you're going to a website where you cannot trust that they do not have malicious code on their website, you probably should not be going to it.
AngularJS for phpbb
Re: AngularJS for phpbb
Since this feature is probably years away, it is silly to be talking about how you are browsing the web today as a pro or con to this discussion.
Using angular or any javascript framework would be a huge change to phpBB. The PHP code would be used mostly for passing data between the DB and the client. The client is where most of the work would be done. I can't speak for the future but if the trend continues then traditional websites that refresh the entire page are going to become archaic.
Using angular or any javascript framework would be a huge change to phpBB. The PHP code would be used mostly for passing data between the DB and the client. The client is where most of the work would be done. I can't speak for the future but if the trend continues then traditional websites that refresh the entire page are going to become archaic.
Eric
Re: AngularJS for phpbb
My opinion, you can write a one-page application and without the use of frameworks.
You just need to provide a stripped-down version of the page (without header and footer) when a query POST with parameter "Ajax=enabled".
It does not require significant alterations in the engine forum, will speed up the pages by eliminating the need javascript initialization, while remaining fully functional client with off Javascript, will enable the search engines to index the normal page, and so on.
You just need to provide a stripped-down version of the page (without header and footer) when a query POST with parameter "Ajax=enabled".
It does not require significant alterations in the engine forum, will speed up the pages by eliminating the need javascript initialization, while remaining fully functional client with off Javascript, will enable the search engines to index the normal page, and so on.
Sorry for my English.
Re: AngularJS for phpbb
Why is a single page better than a multiple page application like phpBB? I don't get it.
-
- Registered User
- Posts: 165
- Joined: Fri Apr 05, 2013 3:38 am
Re: AngularJS for phpbb
There are plenty of reasons. Just google it and you will find out why a lot of sites are going towards a javascript FW for client side than the old school static pages that refreshes completely for each page loads. Also once you know what Angular can do, its hard to discard it. Its just simply amazing and phpbb can benefit a lot from it!brunoais wrote:Why is a single page better than a multiple page application like phpBB? I don't get it.
Re: AngularJS for phpbb
I seriously thing you are in the wrong page.
AngularJS is for javascript applications. phpBB is not a javascript application.
Yeah, it has js to improve the user's interaction with the website but it is definitely not a client side application.
I have already tried AngularJS to do some stuff (including simple games) and it is ok.I still prefer the DOM or the DOM with a simple facade (not a library like jQuery or mootools), though.
I searched for: "Why is a single page better than a multiple web page application"
None of the results on the 1st 2 pages answer my question.
Why is a single page website better for server programs like phpBB than multiple pages?
It works well with linkedin, it works well with google search(when js off), it works well with jsperf, it works well with github, it works well with stackexchange (&cia), it works well with blogspot, it works well with wordpress, etc... Why change it?
Also, AngularJS is awful when dealing with multiple tabs, same content. For instance, I like opening different topics in different tabs and also having multiple tabs each one working with its relevant information (happens a lot with phpBB). Are you going to tell me that links will stop working mostly like it is with facebook? I already use much less facebook because of that.
Also, are you going to use something that works with pushState()? I still want my back and forward buttons to work and hashes are a terrible PITA hack. AngularJS does not deal well with multiple urls meaning multiple pages (in my tests and research), btw.
There are some advantages having phpBB in a single page but, IMO, the disadvantages just outrun the advantages.
AngularJS is for javascript applications. phpBB is not a javascript application.
Yeah, it has js to improve the user's interaction with the website but it is definitely not a client side application.
I have already tried AngularJS to do some stuff (including simple games) and it is ok.I still prefer the DOM or the DOM with a simple facade (not a library like jQuery or mootools), though.
I searched for: "Why is a single page better than a multiple web page application"
None of the results on the 1st 2 pages answer my question.
Why is a single page website better for server programs like phpBB than multiple pages?
It works well with linkedin, it works well with google search(when js off), it works well with jsperf, it works well with github, it works well with stackexchange (&cia), it works well with blogspot, it works well with wordpress, etc... Why change it?
Also, AngularJS is awful when dealing with multiple tabs, same content. For instance, I like opening different topics in different tabs and also having multiple tabs each one working with its relevant information (happens a lot with phpBB). Are you going to tell me that links will stop working mostly like it is with facebook? I already use much less facebook because of that.
Also, are you going to use something that works with pushState()? I still want my back and forward buttons to work and hashes are a terrible PITA hack. AngularJS does not deal well with multiple urls meaning multiple pages (in my tests and research), btw.
There are some advantages having phpBB in a single page but, IMO, the disadvantages just outrun the advantages.
-
- Registered User
- Posts: 165
- Joined: Fri Apr 05, 2013 3:38 am
Re: AngularJS for phpbb
brunoais, from your post I can understand that you barely even scratched the surface of Angular and hence you feel it doesnt suit phpbb. Actually, some of the things you have stated about Angular is not right. With the multiple tabs, Angular should have no problem in handling it. Also the urls works as per routing that Angular manages and each page that you visit in Angular will have its own url. So when you do open multiple tabs with different urls, Angular can fetch that page using ng-route. Angular also works when you use the normal browser back / forward buttons with no issue. The big difference (although there are many huge differences other than this) is, instead of loading the entire page each time, the main page frame with its resources are loaded once which will have the header, footer, navbar , etc.. and then the main page's content will be placed inside a "view". Angular then takes care of changing the view based on the url without needing to refresh the entire page. This is based on MVC architecture where the controller passes a scope to the view and the view is created based on the model. It also increases the page loading speed (ofcourse after the first load), faster and intuitive UI and gives a much richer interactions between UI components if you look at it from the user's perspective. Again, this is just one feature that I am highlighting and there are so much more you can do with AngularJS. We can take phpbb to a whole new level by using Angular (so any similar JS FW). Once we have the RESTful API done with phpbb, we can use the php for all server side processes like communicating with the db, use this server-side API for Dynamic data loading, submitting and processing forms and photos, fetch results and return back to Angular, etc.. and Angular takes care of the client side processes like showing the right contents to the user, form validations, displaying views, async processing, providing a more fluid user experience, etc.. etc.. Honestly, its too early to discard JS FW like Angular before even diving into it.
-
- Registered User
- Posts: 165
- Joined: Fri Apr 05, 2013 3:38 am
Re: AngularJS for phpbb
Yeah it does. Angular comes with JQLite built in and we can use jquery instead if we want. It is fully extensible and works well with other libraries. Here is a quote from Angular site:DavidIQ wrote:Does this work side by side with jQuery or other libraries?
Having said that, a lot of things done by jquery can be done easily with Angular itself and we may not even need to use jquery. But if we still like to use jquery alongside for something that cant be done from Angular (I cant think anything in particular), you can do so with no issue.AngularJS is a toolset for building the framework most suited to your application development. It is fully extensible and works well with other libraries. Every feature can be modified or replaced to suit your unique development workflow and feature needs. Read on to find out how.