Considerations on loading speed with AngularJS one page app - javascript

The argument of one-page app with AngularJS is not clear at all to me. Specifically
why should one prefer one-page apps over standard implementation?
is there any free service that will turn multiple-pages app into Android app?
opting to go for one-page app (as they show in their beginner tutorial) what's the best way to implement it so that the website/app (inclusive of User Panel ecc) doesn't become really slow in phones? Loading controllers only when they're called will help significantly? Is there a relevant page in their documentation on how should an app be implemented in multiple pages?

It really depends on what you want to build, if it's a website, then probably SPA (Single Page App) is not for you, but if it's a web application then SPA is aimed to give the user a more application like feeling (especially when its intended to be used on phones or tablets and wrapped with something like Phonegap)
Not sure what you mean, if you want to take an app written with JS/HTML/CSS and make it native on Android/IOS etc. then up-mentioned Phonegap will do the trick.
If you mean that you want to make a multiple page app to a single page app, then NO, there is no service like that, you'll have to manually do it.
This is a very complex question and has a lot to do with the way you code and what you build, but you can look here or here for some pointers

Related

How can i use ThreeJS in my android app , or is there any library similar and powerful like three js

Actually I'm making a website where people can customize their jewellery online, I am making this with the help of ThreeJS and I want to make an Android app too, so I must make API only APP for my website and Android App So, please tell me, how can I make API only app with ThreeJS like my website, to consume in website and android APP and iOS app.
Please suggest me.
Three.js is written in javascript so it cannot easily be integrated into a native app. Performance-wise it would probably be best to reimplement the rendering in openGL-ES (which webgl is also based on).
If you want to stay with your three.js implementation you will only have the choice to run your code in a browser-environment (because webgl and javascript) by using a WebView that runs the javascript and webgl-code (quick googling turned up this, which looks promising: https://blog.ludei.com/webgl-ios-8-safari-webview/).
There might even at one point turn up a proper react-native implementation of webgl or even three.js...

Moving from Ionic to NativeScript with at least efforts

What is the fastest way to move (migrate app) from Ionic to NativeScript with the least efforts?
Without rewrite old AngularJS controllers and services.
And using NativeScript with AngularJS not Angular 2.
I need to re-write UI with CSS (replacing HTML with XML) only.
Question is: Does this applicable? or there is no option but to re-write whole app!
If yes, what the path that I have to follow to make it?
The story if you want to know why I want to do this:
I have a mobile application that based on Ionic (ionic 1 with AngularJS), Ionic is really nice platform to build app, but a lot of headache specially with performance challenges, in my App I have a really an issue with this through many devices, until I found NativeScript which is really awesome, so I'm thinking about move my current live app from Ionic to NativeScript.
Until now, as I see seems I have to re-write whole app from scratch, but this is costly and not an option for me, I was searching in internet and found no clear answers, even in documentation they seems only using Angular2 with TS (which is better but not have time for this now) or just plan JavaScript.
This is good side reference: Lost in hybrid app frameworks like Ionic, Cordova,
Simply put you can't. Angular 1 is dependent on the DOM. With NativeScript there is no DOM. Which is why you have performance issues in the webview. You need to just bite the bullet and rewrite it with ng2 you'll thank yourself later. The webview is your downfall with your performance on Cordova and to get away from that you'll have better performance and the perf benefits you get with ng2 are also very nice. Heres a link with some good info on ionic 2 to NativeScript but that's as good as it gets. Because you can't easily from Cordova webview app to native UI like NativeScript or react native. https://www.thepolyglotdeveloper.com/2016/05/converting-ionic-2-mobile-app-nativescript/
Here's someone who just went ionic 2 to NativeScript and commented on the slack channel https://nativescriptcommunity.slack.com/archives/general/p1471789794013989 join the slack channel for some really awesome community help if you decide to do it.

Possible Web Framework to Use in Existing Application

I work for a medium sized company that has an application used by a few thousand people and is built primarily with HTML,Javascript, aspx, xml, xsl, and runs on IE 11. This application is proprietary and not designed in house but we have access to the code for possible modifications and its just sitting out there on the server(s). A new project has come down the pipline for an enhancement\adjustment to be made to a particular area of the application and I'm wondering what kind of web framework I could use to do this work. I am really just needing to call an enterprise service and get data back, display it, and that's about it, so its not incredibly hard. I am worried though about how to integrate it with the existing application.
I am not sure how this scenario would go:
User navigates to page A inputs data, I want that data to go to a controller or something I built, fetch info and send it back to page A. I was thinking of using Spring MVC but not sure. Any feed back or suggestions would be greatly appreciated! I know this question doesn't include code, so please don't hate me.
Thank you.
From a very high point of view and with no knowledge about any specific requirement.
If you have already an application developed in ASP.NET, it's better that you continue the development of the new module of the application on the same platform.
If you want to develop a new module (actually a new web app) that looks like the old application but with a totally different platform like Spring MVC (could use any other), you can reuse the existing css styles and databases.
For integration purpose you could modify the original application in the menu(or links) that redirects you to the new module and implement a single sign on server (this will required work on both applications) to made the transitions smoothly between both applications (something like a portal style). Note that they will have a different context application path.

Dojox/app for desktop applications. (Dojo 1.9)

So far in my Dojo web applications I have handled the main application flow by separating all of the high level views (ex: home, search page, admin page, etc) into widgets and changing views by adding them to a all-encompassing widget that contains the entire application and swapping out the display css property ('none', 'block') of the high-level view widgets.
This works, but seems clunky.
I have started looking into dojox/app, but it seems more suited for mobile development.
From the dojo reference guide:
dojox/app is an application framework designed to simply configure through a configuration file an application formed of potentially nested views and to facilitate the transitioning between those views based. Its main current targets are mobile (phone & tablet) devices but it is not restricted to this and can be used for desktop applications as well. Thanks to dojox/app the applications are easily configurable and buildable for easy and fast deployment
Perhaps someone with experience could lay out some pros and cons for using Dojox/app in desktop applications running in the browser?
Or other more formal alternatives to handling this (view switching in particular) manually?
The main reason (I think) that the dojox/app library mainly focuses on the mobile aspect is because the mobile community actually needs it more than a desktop environment. Usually when developing mobile apps you will use a multi-page structure due to the screen size (for example a list page, a detail page, ...). While desktop applications can rely on using a single page (and then the dojox/mvc framework alone will work as well).
The dojox/app library includes many application level APIs, such as navigating between pages (controllers/views) while dojox/mvc mainly focuses on the Model, View, Controller part.
However, dojox/app will work fine on a desktop environment, the most important change will probably just be the view, but the technology behind it doesn't change.
If you're looking for a list of pros/cons I cannot give those, the only thing I can come up with is that there are not a lot of examples on the web about using dojox/app on a desktop environment. Even the reference guide is not up to date (as it is still using data stores which are deprecated).
I don't think there are other alternatives inside the Dojo toolkit (certainly not if you're looking for view switching), you could use dojox/mvc but it means you will have to do more things by yourself. But there are plenty of JavaScript MVC frameworks on the web (AngularJS, Ember.js).

Providing no-js fallbacks for clientside MV* frameworks

I just recently got introduced to MV* frameworks and have taken a chance to try out Ember.js with the TodoMVC app tutorial they have on their site.
I was considering using Ember for one of my upcoming projects (a Ruby on Rails CRUD app, similar to Twitter in some of the functionality), but I'm still a bit confused and before I take a final decision I would love it if somebody could clear the following concerns:
Is it a good idea to use such an advanced framework as Ember for a medium-sized multi-page CRUD app? Will it improve development time and maintenance compared to an interactivity layer built with jQuery's DOM manipulation and AJAX capabilities? Or is using Ember (and the like) only good when developing complex single-page apps (e.g.: Grooveshark)?
Considering the app will be developed using Rails, and assuming Ember will be used, is it going to be possible to offer a fallback with basic functionality for browsers with JavaScript disabled and/or for search engine crawlers? Will it require code duplication or other dirty tricks? Do you know of any technique that can be used to achieve it?
Will it be possible to adapt the website for mobile browsing (using only CSS) with valid results, or will the overhead imposed by running Ember on the phone make it hard for the device to render the website in a way that keeps it responsive?
We're in the middle of a pretty big Ember project right now, so here are my thoughts on your questions.
We've found Ember to be really productive for creating rich UIs for our single page app, but I don't know that it's going to be that much more helpful if you're creating an app designed for traditional multi-page (viewing pages, submitting forms, etc) layout.
I think this is the clincher - Ember is completely JS-based, so if you need to support browsers without JS, you'd basically have to write a parallel application. If this is a hard requirement for your app, I think Ember (or any MV* JS framework) would be out of the question
We've had very few performance issues on mobile - our site is fully responsive and renders on everything from Blackberries to the latest Chrome on desktop with good performance.
#Scott Rankin, has addressed most of the concerns with going with the Pure Ember approach. I'll add one quick way to make this decision.
Go with Ember/MVVM if the application is behind a login. Then you don't have to consider search engines, as the content is generally private and not supposed to be indexed.
For SEO you have to build atleast part of your content such that it is indexable. A good example of this is the Discourse application. They use Ember but also send down some generated html along with the app html slugs, so that search engines can index them. You can read about their approach here.
We have a different approach which can be seen as a fall back: We pre-render a static version of each page in the application (daily scheduled task). This static version is stored on the server as HTML file. Whenever we sniff as spider/ robot user agent, we deliver that version.

Categories