Last post Mar 12, 2015 09:35 AM by itpreneur
Mar 10, 2015 12:04 AM|852EC327|LINK
let's have a discussion about SAP and the general web application with some interesting problems:
1) The general web application always starts from server, which means no matter whether u use asp,php,asp.net or asp.net mvc……, the pages (views) are generated from the server-side, clients almost does nothing or little things (compared with the server tasks).
And once the amount of people is rapidly increasing, the speed is very slow.
2）So in order to solve the problem, another solution to use pure HTML pages with some blocks requesting from WebService/WCF/Web API comes! (SAP).Of course the speed is very fast and this will improve the feeling of customers. However, it is still not an
easy task to control the view, and there are always a lot of things done at the client side.
3）So in my mind, SAP just pushes all the things almost to the client side to forcely seperate the client side from the server one. And the server side just exposes many interfaces for the client one to fetch data in a special formation such as JSON....So
I don't think it really improves corely. Just pushing from one side (server) to the client one (SAP).
4）Now my question is:
4.1）Can a SAP be a really SAP like Winform application that will balance the tasks between the server side and the client side?
4.2）Any good architectures or designs?
4.3）Will NodeJS will take some necessary tasks in the architectures? If yes, then how？
4.4）When and where to use SAP？Is it a good idea to force to seperate many pages into SAP pages and do them in a general web application？
Mar 10, 2015 03:32 AM|Mikesdotnetting|LINK
I assume you actually mean SPA (Single Page Application), not SAP (which is a huge German software company).
All the main processing still needs to be done on the server. The benefit of SPA is that the requests and responses are generally smaller, consisting only of structured data, so the application should be more responsive - all other things being equal. You
can look at a number of client-side libraries for SPA, each having their own characteristics. The most popular among forum members appear to be Angular and Knockout. Angular uses the MVC pattern, whereas Knockout uses an MVVM pattern.
Mar 11, 2015 01:12 AM|852EC327|LINK
Thank you for your kind help. Mike;)
1）It's my fault——It should be SPA.
2）Will NodeJS will take some necessary tasks in the architectures? If yes, then how？
3）When and where to use SAP？Is it a good idea to force to seperate many pages into SAP pages and do them in a general web application？
Mar 11, 2015 02:41 PM|itpreneur|LINK
If your application works toward microarchitecture then nodejs will be useful. It means if your app needs to be distributed with several parallel/multitasking processing and servicing that can be tested and working independently and be made available of
the services to be consumed by another process/app.
SPA is used when you want to have more user interactions such as dashboard, etc where you want immediate and no delays or whatsoever in your UI. This works toward your skills and familiarity of different technologies json, ajax, SPA framework such as what
Mike mentioned (knockout, backbone, angular). You have to think that when implementing SPA, you're suppose to have a different mindset that you seldom hit the server for any request and operates most of the operation on the client side.
Mar 12, 2015 05:32 AM|852EC327|LINK
Thanks for your quick reply!
In fact, the reason why I use NodeJS is because:
1）I have to define model classes at the server side, and for the client one, re-define them.
2）All the browser is single thread (No a real multiple thread processing).
So since NodeJS will act at both client and server side, will it solve the problems above? I don't wanna re-define models at the client side but just re-use the server model classes again or try the best to mimify the definations of model classes.
Mar 12, 2015 09:35 AM|itpreneur|LINK
I'm baffled with your first statement with the reason to use NodeJS.
1）I have to define model classes at the server side, and for the client one, re-define them. <----- this is not best use case to use NodeJS. Mimification of declaration of your model classes doesn't have to do with the use of NodeJS or simply asp.net
mvc or any other webapp. We must realize and understand first how we utilize and maximize and leverage technologies.
Here are some basic simple use case where I use NodeJS.
1. Any cpu/io intensive operations e.g. web scraping, file processing, etc.
2. Exposing services to other internal services that is critical to the operation that WebAPI will be outperform with Performance
3. messaging system such as chat services, stocks, anything that have lots of incoming concurrent connections to be served
4. low level socket io operations
5. and a lot more
It's not because it's a new KID in the BLOCK doesn't mean that you get involve and use them. Be diligent with your architecture and become wisely involved to become either an early adopter or late adopter of technologies. All has PROS and CONS. Again, it
all depends on what you achieve with your BUSINESS USE CASE and not to be tech USE CASE.
I am shedding lights here and not to condone you not to use Node.js just anywhere and anytime in every DEV projects.