How to separate development of client-side web UI and the server side - process

I'm in the process of providing a Web UI as an alternative to our current desktop UI for our C/S enterprise application.
When developing the client-side in our desktop version, UI developers could connect to any server so they only needed the client-side environment.
When developing a Web UI (Client-side JavaScript in the browser), we are bound by the browser's "Same origin policy" so the UI must talk to the same server from which the UI code is downloaded.
As far as I see it till now, the development scenario for the UI guys is:
Developer installs server on local
machine and runs it.
Developer edits the HTML+JS+CSS files on local installation.
Developer has to reinstall/update server on local machine each time there's a need to test UI code against new server behaviour.
This does not seem too comfortable, at least compared to our previous C/S style development.
Are there any other ways you can suggest to that will not require UI developers from installing and updating server side components on their development machine ?
Or anything else related that can simplify the development process ?
Thanks :-)
Editing in some clarifications:
I'm mostly interested in the aspects of UI coding, not UI design.
I need a lot of server interaction - getting data from RESTful web services, which are developed in parrallel - hence the need to have an up-to-date server

You haven't specified the development platform.
As far as pure HTML/JS/CSS is concerned, you don't need a server. The UI developer can fine tune UI components locally.
The moment you want to talk/integrate to Server (via AJAX, JSP, ASP...) then you need to connect a development server as now your changes have to be served by Server.
Most of UI fine tuning can also be done from Firebug
In our office when changes to styling are required we save the page as a local copy and send it to the UI designer, he makes his changes and we integrate them. So the UI designer don't have to maintain a development environment.

JSONP lets you work around the same-origin problem (with server support) -- check it out! If the front-end-in-the-browser developers are using a good framework suc as jQuery or (my favorite) Dojo, JSONP should be no harder for them than plain JSON.

Develop on a shared server, but depending on the size of the team.. that's challeging with respect to version control.
Or deploy automatically generated virtual machines with nightly builds, so the devs don't have to install, but always use a recent version.
In the case of UI developers depending on a common REST server, the UI development can be done on the local machine and the REST service should be on a central server. When changes are made to the REST service these should be deployed to the central server (when stable), so all developers can use the newest version (this also helps with testdata).

You could try using a proxy on the developer's machine where some paths redirect to the server and some paths redirect to local folders.

Hmm, I actually didn't really get any information on what kind of technology you're using. If - with UI Developers - you mean designers, which have to take care about the CSS, layout etc, then we do it the same as lud0h said. We (developers) send the UI designers a copy of the server-side produced HTML pages. They then edit the HTML pages according to accessibility guidelines, CSS and layout and send us back the outcome of their work. We use their HTML pages then for integrating them in our web applications.
If you don't just mean tuning CSS, but also to write JavaScript / Ajax functionality you HAVE to use a server with which you're communicating. As you said, normally this is done by having a local environment which is similar to the server-one. In .Net Visual Studio '08 provides an internal webserver, alternatively you have to install IIS locally. In Java environments you have to install Tomcat and related technologies. In my eyes this is a must. What you have to have is
Versioning system (CVS, SVN,...) where developers commit regularly (minutes/hours)
local environments where developers checkout the source from the repository and develop
Test server where you deploy on a daily basis (could be like daily builds) in order to test your running product
I guess this should be what a professional development environment should consist of. The difference to C/S application development is that web UI and web-client code are not that separable as a Client UI in C/S environment from the server-side. Unless you develop with technologies like GWT or Silverlight which are quite similar to C/S, just running inside the browser, but communicating over RPC calls or web services.
//Edit:
What I nearly forgot. Don't do something like developing on the server directly, meaning that all of the developers access the server's filesystem where the code, UI etc. lies!!

You can use CORS. a new technique just like Ajax, but with ability to make calls on other domains. so you will need only one UI on one server. think this can help you.

Related

Aurelia on shared hosting

I was wondering if it is possible to run an Aurelia project on a shared hosting where there's no access to ssh, no NodeJS (and of course no gulp watch or anything else) with only PHP available.
I was wondering if it is possible to run an Aurelia project on a
shared hosting where there's no access to ssh?
SSH has nothing to do with Aurelia. SSH is for remotely logging in to another computer.
I was wondering if it is possible to run an Aurelia project on a
shared hosting where there's no access to no NodeJS?
Node.js has nothing to do with Aurelia. Node.js is a JavaScript runtime environment designed for asynchronous eventing within network applications. Aurelia is a client side environment that may optionally talk with a Node.js enabled server to retrieve server side data.
I was wondering if it is possible to run an Aurelia project on a
shared hosting where there's no access to gulp?
Gulp is essentially a task runner to automate things such as the minification of CSS and JavaScript files; the bundling of files; basically the repetative and tedious tasks you would perform by hand to prepare your web application for production (amongst other things).
I was wondering if it is possible to run an Aurelia project on a
shared hosting with only PHP available?
PHP has nothing to do with Aurelia. PHP is a server side scripting language designed for web development that can be used to server up information to the web client. Aurelia is a client side environment that may optionally talk with PHP to retrieve server side data.
What about ES6 / Typscript?
Aurelia, Angular 2, plain old JavaScript, etc... all can be written in ECMA 2016 or TypeScript. The transpiler, i.e., Babel or the TypeScript transpiler, will convert the code into ECMA 2015 to be compliant with today's browsers.
I'd recommend reading the Aurelia documentation, playing with the sample Aurelia skeletons, and maybe even viewing the 2 Aurelia courses on PluralSight which do a great job at introducing the Aurelia framework as well as most of the questions you've posed.
Yes it is possible. Aurelia is pure javascript and requires no server side technology to run. However, you would probably want some way to feed your Aurelia models with data from your back-end. PHP is as good a choice as any.

Want to Run VB.Net Desktop Application in web Browser as Web Application

I have a Small ERP Financial Software developed in VB.Net and SQL Server consisting on modules
HRM, Accounts, General Ledger etc.
Now i want to run some module on web but Creating all application in asp.net or other web tools is too much time taking.
Is There any way to run this Desktop application on web espacially in Web Browsers. ?
Any Help.
If you don't want to re-write your application you could have a look at Go Global.
I can't vouch for it as I have personally never used it, but I know of people who have.
I have tested that for a proof of concept on the past and it runs great. Called .net zero deployment, you can look it up. The only concern is off you need database access, remember that you are paying through the port 80, so a need for a web service to access database call may be needed. Not sure of I have still the code trial, but I can look.

Web server to host Sencha app?

I am looking to develop some web app for my Android device. Found Sencha and think it might be a good tool to try out.
I suppose I would need to find a web server to host the Sencha app to run the app? What kind of web server is needed? I suppose one that able to run HTML5, CSS, Javascript is enough?
Can anybody recommend one (free one)?
Thanks.
++++++++++++
Thanks for the answers to the above post. I am new to this stuff, so got some more follow-up and somewhat related questions:
1) I read from the Sencha site that the app can be developed locally using things like XAMPP installed on local Windows PC. Question -- Why need this local host when I can just use an external Web Host?
2) It was also mentioned that for Windows may not need XAMPP if Window's Internet Information Server (IIS) is already running. How do I know if my computer is running this and so don't need to install another local server? (I asking this because I had installed an XAMPP before on another computer and things got quite messed up and so I want to avoid doing it if possible).
3) Once I got a web host, to have an app running, I would just have to have the JS files in the web host together with the Sencha framework right? If so, then I don't understand what is meant by "Build" in the Sencha documentation.
Thanks.
Sencha Touch is a client side framework, therefore there are no server side requirements. That said, any web host should do.
However, I'll go ahead an make a recommendation... a LAMP stack (Linux, Apache, PHP, MySql) will work the best. Of course you can substitute any of the stack for something of your favor, this setup seems to be the most favorable. Some of my colleagues utilize Ruby/RoR instead of PHP, so as you can see it is quite flexible in terms of environment.
When searching for a hosting provider, do your research and select something that fits with your budget but still gives you the best bang for your buck. Be sure to ask them questions!
Tip: Make sure you have access to your web server's configuration file so you can add mime_types and make other mobile oriented tweaks if needed.
First you must know that HTML5, CSS and Javascript are all front end stuff that do not count when you talk about Hosting. These are taken care of by the client agent (browser).
What really matters is your server side language: PHP, Python(Django), Ruby, etc.
So it mainly doesn't matter which framework, as much as which language that framework use.
This is a generic answer that will help you decide not only in terms of Sencha but for any other framework.
Take for instance WordPress. It uses PHP and MySQL, so first I look if my Web host supports Mysql and PHP and in general this would be enough to know that I can use if for my WordPress site.
And by the way, most Web host companies allow you to ask them questions before buying. So go ahead and question them about anything that concerns your requests.
Sencha provides an app hosting service through its Sencha.io cloud services.

Out Of Browser Silverlight app with local offline database and WCF-RIA

I have the following scenario:
We develop a silverlight 4 app for our customers, that will be used as an out-of-browser app. The app is working offline, i.e. app and database are on the users local machine. The app is using WCF-RIA-services to connect to the local database. The database will be an SQL Server Express, SQL Server CE or MySQL. We are using MVVMLight and MEF.
An external webserver is only used for updating the app from time to time or adding new modules to the app. To achieve this we do something similar as shown in Jeremy Likness blog (http://www.wintellect.com/CS/blogs/jlikness/archive/2010/05/25/silverlight-out-of-browser-dynamic-modules-in-offline-mode.aspx )
The reasons why we are doing such a scenario are complex. But to keep a long story short it is mainly for compatibility reasons for a later online version and we don't want to use WPF. So we need to get this working with Silverlight and WCF-RIA services.
Ok, that's the scenario and here's the question:
Do we need a local webserver in this scenario? The app is programmatically installed as out-of-browser, the database is local and connected via WCF-RIA.
If yes, which webserver would be sufficient? It should be installed and configured via an initial setup that is executed by the customer. The customer should not have to do anything with configuring the webserver.
Any other ideas or comments on this scenario? Any other possible solutions for this?
Thanks for your help
Dirk
silverlight wasn't meant to be used this way I think. So it would be like when you are developing app in visual studio and use Cassini to see result - everything runs locally - but you still need a web server. Maybe more info here - http://www.infoq.com/news/2010/06/WPF-vs-Silverlight
I´m not able to provide with a full answer to your problem, as we are currently facing the same problem. (WPF not being cross-platform, Very specific hardware on some clients)
But I may share some of our thoughts on our type of Thick-Silverlight-Client:
To keep deployment etc. simple we use a self-hosting process (installed as background process)
We may not use RIA as the background process has to run using Mono VM (but for MS-only solution see Can WCF RIA Services be self hosted? )
Architectural thoughts on standalone "Clients":
Depending on your requirements implementing a server for each client communicating with the "main"-server by messages (NServiceBus) may be overkill. But if you want to use a client database if offline and silverlight for ui you should consider using an event-driven-architecture.
There is a slideshow on combining "Event-Driven-Architecture" & "CQRS" with Silverlight. But i would not use it as a blueprint more like an inspiration.
http://www.slideshare.net/dennisdoomen/cqrs-and-event-sourcing-an-alternative-architecture-for-ddd

Desktop Based Application

What is a better platform/language for developing Windows/desktop based application that can run offline (sometimes)? .NET (C#, ASP) or Java or any other development tool? This application requires to store data into a database(involves some GIS) and later Synch both ways with the main server (SQL/Oracle) during off hours or when initiated by a user or event or when online? ALso the tool/IDE recommended should allow us in the future to migrate this desktop application as a Web based application to the corporate server with less pain or re-work when internet/nw access is available to all of our remote sites/users. Any input/advice is appreciated.
If you are strictly doing Windows desktop application development, C# or VB.NET would be an excellent choice. There is a ton of documentation out there for .NET developers. Although the framework is a free download from Microsoft, any serious work is cumbersome and tedious without the IDE.
If you needed the potential to support your application on multiple operating systems besides Microsoft Windows, then I think it might be worth looking into Java.
For web solutions, in .NET you have ASP.NET, Java you have JSP and Tomcat.
You could try Adobe AIR. It seems like it would serve most of your desktop needs and it should be the easiest to migrate into a web app (Flex).
C#/WPF for desktop with Silverlight, XBAP or even ASP as the online options.
Since you mentioned the desire to web-enable this application at some point I'd look into Silverlight. Out-of-browser capabilities were introduced in Silverlight 3. That means that the app can run directly on the desktop, and the internet connection is optional. However, when the internet connection is available it has built-in support for auto-updating itself.
And now in Silverlight 4 it's possible to run an out-of-browser Silverlight app with elevated trust. Silverlight 4 also finally introduced things like right-click support, clipboard access, full keyboard support in fullscreen mode, etc. So if you're just now starting development, I'd most definitely use version 4.
You'll have to communicate with something like a WCF service for a lot of the database operations. But going with Silverlight should allow you to build something that'll work on the desktop and the web alike without having to manage two systems.
Going web-based after you already developed a desktop application is a really bad idea. There is no reason the desktop application cannot use a internet connection, and be updated from a server.
You could try Delphi. It's a rapid application development tool. Very different, but very quick to use. Well suited to Oracle integration. Data sync is probably going to need to be custom, unless you're using something like Sybase SQL Anywhere.