Netbeans 7.3 - new html5 project - where to place php and mvc? - client-side

I may perhaps been missing something really basic here.
Netbeans 7.3 just came up, with this new HTML5 project feature.
It seems interesting, but the way it's setup make me ask some questions that tremble the foundations of our own way of developing.
1) If we build using MVC structure on a given php framework, how can we then relate those with the HTML5 project feature ?
2) As far as web development concerns, I'm taking into consideration that there's no such think as a useful HTML5 application without the server side counterpart (login, database etc...). - Am I wrong ?
3) Until now, we have developing on the same project both Server Side, and Client Side, using MVC to order those different programming approaches. However, this seems to force us to split the development of the client side as one separate project and the server side of things as another project.
Regarding this point 3, are very big projects done with this separation ?
Any lights are greatly appreciated.

Related

JavaFX, DataFX and server-side code

I'm looking at enterprise JavaFX, and how to integrate JavaFX with server-side code. In the last few weeks I've done a certain amount of research in DataFX and Open Dolphin, and downloaded some videos, as well as looking at a couple of other frameworks. For example I've looked at the video on DataFX at:
https://www.youtube.com/watch?v=EN4fo6x0DcQ
However, although this video and others I've looked at explain how to set up a client application that connects with a server, I've found very little information on how to put together some server-side code that the client can connect to. Sure, one could use JAX-RS, but why re-invent the wheel? In the first instance I would like to put together some really simple server-side code that some test client-side code can connect to using DataFX or one of the other frameworks. The aim eventually is to get a client using JavaFX to communicate with a server.
My second question is that of the various frameworks available, is DataFX the best to use for a simple application?
I have experience with a Glassfish server hosting a JSF application, and it may be useful to have such a server hosting a JSF application communicating with a browser as well as communicating with a client JavaFX, as that way I can test out that the communication with the JavaFX application.
The latter is a bit of an aside, and my main questions are where can I get information on server-side programming for this, and the best frameworks to use?
Many thanks in advance.
If you are able to manage yourself the client-server communication you can pick any JavaFX Application Framework listed there:
https://github.com/mhrimaz/AwesomeJavaFX
Any of them allows to separate UI code from communication code.
As I'm author of JRebirth, I can advice you to create some RemoteService (extends Service and providing JAX-RS facilities or whatever) to perform this job.
If you search an all-in-one library managing client AND server side, DataFX + OpenDolphin is probably the most advanced one.
I'm the author of DataFX & Dolphin Platform (https://github.com/canoo/dolphin-platform). Both are valid frameworks that fill fit to your needs. Maybe a combination of both - Dolphin Platform as remoting layer between client and server and DataFX to define the routing and mvc based views on the client.
Some days ago I copied all the DataFX sources to GitHub (https://github.com/guigarage/DataFX) and currently trying to create a new version based on the modules that are maintained by me. Maybe I will extract the MVC related stuff and create a new framework based in it, we will see. What I currently can say is that I plan to work on it the next month next to the Dolphin Platform since I think a combination of both will be a good fit.
I would use this combination today to create applications but yeah, I'm the main developer of both frameworks so the choice is quite easy for me ;)
As you mentioned JSF I think that Dolphin Platform is a perfect match for you since one idea of the framework is to have a modern successor for JSF that can be used to create desktop & web based applications but provide managed controllers on the server. We provide a cool maven based jumpstart (Maven archetype) that will give you a quick introduction and a runnable client / server application with a desktop and web client in 2 minutes: https://canoo.github.io/dolphin-platform/#_dolphin_platform_jumpstart

Migrating from asp.net webforms, do you recommend mvc or web api?

I know I´m late for this party.
Currently migrating form asp.net webforms to newer coding technologies and paradigms. Barely got started with asp.net mvc and now I´m noticing all this fuzz about mvc vs webapi. I'm an oldschool programmer and don´t really feel confortable with the "use both" approach, if there´s no need to. Please consider this:
My web projects focus on dynamic dashboards/admin sites to manage CRUD operations for tons of SQL records, generate reports on demand, statistics, etc.
No static websites at all (like info sites, portfolios and such).
Performance over UI design. Actually bootstrap basic UI is enough for me.
Pure ADO over entity framework, whenever possible.
Any tip or guidence on what I should choose would be very much appreciated.
* Edit/Closing *
Hi again and thank you for your feedback.
After a lot of reading and experimentation I´ve decided to give a real hard tryout to asp.net webapi + angular.js, mostly because I want to leave the door open for multiplatform/device usage (not web only).
Also, I found a very interesting article/tutorial in https://superdevelopment.com/2013/12/16/building-rich-web-apps-jquery-vs-angular-js/
It may be a little old but I think it´s worth reading, specially this extract right here: "Angular.js and WebAPI is a new way to build rich interactive web applications that fully embraces what can be done with a Web browser, JavaScript and C# rather than relying on out-dated paradigms that complicate the process for all but simple use cases. If your users and clients are expecting an application in a web browser that behaves like a native app on their desktop or smart phone, then jQuery + ASP.NET MVC is not the most straightforward way to build it."
Anyway, thanks to all and I hope this info helps others in the programming community.
if your application is going to be consumed various type of devices then prefer web api.
if your application is like website or portal where user has very little interaction then go for MVC

What is a good easy to use framework for rapidly developing web apps with a C# backend?

I am after recommendations for a framework (or project template) for rapid application development using C# on the back-end. It must support the following:
User login/authentication
SPA
Responsive client
Easy to understand client and server (not a steep learning curve like AngularJS)
Clean/uncluttered project structure (both client and server). Some OOTB ASP.Net project templates are very cluttered (eg the the VS2012/2013 SPA MVC/Knockout/BackBone template) - maybe I could be convinced, but just looking at a new project it puts me off instantly.
Easy DB access.
Flexibility on the client (for custom functionality eg adding maps and other UI libraries like D3) - don't want a client framework that you have to wrangle to paint outside the lines.
Would appreciate any/all suggestions/opinions.
Thanks
Tim
Like anything in software, there are so many ways to do this. You are essentially asking for a complete system architecture. You could try to be more specific, but your question is going gather opinionated answers and this will probably end up getting closed.
But I'm bored and will throwin a couple of pennies before that happens:
C# most likely means you'll be going .NET on IIS (though maybe its docker on linux?? refer back to my first line above)
User login/authentication
If its IIS, you could be running Windows Auth, or if in an enterprise, Kerberos or Federation. Or if its going against social sites, maybe OAuth? This one depends on what authentication your users need and is really separate of the other areas below.
SPA / Responsive client / Easy to understand...
You listed some very popular frameworks (Angular/Knockout) used in modern SPAs. You may not like them but these are becoming industry standards. Responsive web is pretty much bootstrap or foundation. Though, angular material seems to be gaining popularity too.
Easy DB access.
Whats your definition of easy? Looking for an ORM? If so, Entity Framework is popular in .net apps. Or if you are more of an SQL person, maybe LINQ is easier. Many options here too.
Flexibility on the client ...
Though you may not like some of them, using popular frameworks means you get a lot of developer support behind it - and a lot more answers here on SO if you have problems. One man's sunset is another man's sunrise. What you consider difficult might be viewed as easy by another. Hard to say whats most flexible but going popular means you got more help.

Learning J2EE after developing in ASP.NET WF and MVC

I've been developing in ASP.NET for 1,5 years. (I used first Web Forms for a year and when I get a new project I decided to learn MVC) Now I am about changing job where they want me to develop in J2EE or SpringMVC. How long does it take to get practice in those (not to get pro just to reach a level to make good quality software)? I think that those web frameworks are very similar to the web frameworks of .NET I used.
Am I think right? Is there somebody who have changed from .NET to Java (or vice versa)?
I think of it as there are two main things you need to understand in order to build good quality software:
The general principles of the area you're working in
The specific details of the technology you're using at the time.
In the web-space, the principles of ASP.net and the concept of MVC is pretty similar to the concept of the SpringMVC. There are loads of Model-View-* type frameworks, which basically have the same concepts behind them.
You'll have the same set of concerns building an application in Java as you did in ASP.NET - Separate business logic from presentation, connect to a database, appropriate level of logging, security, error management, authentication, etc. etc.
The concepts you learned using ASP.NET you'll be able to re-use in the Java space.
The specifics of how you utilise them will be different (although often, surprisingly similar - compare nunit with junit, Hibernate with nHibernate). It'll take a little while to get to grips with how SpringMVC works and how it's configured, with how to build and deploy a Java project, with the particular structure of the libraries.
But in the end it's the same principles.
Also, particularly in the web space, all of the HTML, CSS, javascript, browser compatibility, user experience is identical. How you include that stuff in your project varies a little, but the actual markup that gets sent to the browser, and the challenges in making it right are exactly the same.
Doing something new like this will help too, because you'll see where the similarities are, and where the differences are. It might help highlight why they're similar.
It would be really good if you got on a project with some experienced Java people on it. They'll have the basics down and be able to structure it so that most of the big risks are managed, so you can get to grips with the technologies and differences to start off with.
Most really good developers can develop in several languages. I recommend you add Java to your list.

Moving towards Ruby on Rails from ASP.NET

I am ASP.NET developer from last 5 years and still loving it. There are lots of good voices in air about Ruby on Rails. I want to ask to community, Is there any worth trying to learn Ruby On Rails as a ASP.NET web developer on following point of view.
Scalability
Documentation
Community Support
Hosting Solutions
Deployment
ETC.
I'd take a gander as ASP.NET MVC. This way you can stick with the .NET Framework yet still get some of the things you probably want out of RoR.
ASP.NET MVC is very lightweight and easy to scale with some of the APIs it provides (SQL storage for sessions or even Microsoft Velocity).
ASP.NET MVC has lots of support from the community and thus has lots of documentation and feedback from the community and Microsoft itself.
Lots. Check out http://www.codeplex.com/ASPNET for more information.
Well, ASP.NET MVC is bin-deployable. So as long as your host supports ASP.NET 3.5 there's nothing else you need. They don't need to have ASP.NET MVC installed in any sort of way. So if you wanted to, you could easily use a shared host.
Deployment is very easy with ASP.NET MVC and with the changes coming to Visual Studio 2010 for easier deployment of web sites via "Packages." I currently maintain 2 ASP.NET MVC sites and find it with bin-deployment to be just the same as a regular ASP.NET WebForms site.
I'm now in your shoes, because I'm learning RoR after commercially developing in .NET for 5 years.
Here is my two cents:
Scalability: I believe that rails can scale quite well, there are numerous options available, such as mongrel clusters on linux.
This one is a bit worse than on .NET. But the community is very good and you'll never find yourself searching for a good way to go.
See above (it is excellent)
Hosting is not a problem: numerous hosting options available.
I find transition from development to test and then to production better thought of in Ror than in ASP.NET.
I fully agree with Chad's post.
I was half way through development of an app in rails and now i've done a complete 360 and have reconsidered after delving deep into ASP.NET MVC for my day job commitments.
I am now changing courses and looking into ASP.NET MVC for all my personal projects, I think both are honestly remarkably comparable now as I think MS has had a good hard look at Ruby on Rails' feature set and ensured they could match features very closely. After all, if you couple a project with LINQ 2 SQL / EF, ASP.NET MVC and potentially Dynamic Data (if you need that sort of thing), I really can't think of any compelling reasons to choose Rails over .NET, however I CAN choose reasons to select .NET over rails - after all hands down the rich debugging experience with VS.NET, rich intellisense and watcher/quickwatch support plus the ASP.NET MVC framework supports Html Action Helpers, Model Binders, support and encouragement for unit testing, and now with the inclusion of JQuery and JSON results, you're virtually unstoppable.
I suppose besides obviously hosting/licensing costs, Ruby language preference and other personal preferences such as it being open source etc, It's really your choice.
1) Scalability
Rails is just as scalable as any other web-application stack. The only difference is that your single server might get overloaded, and require splitting to 2 servers sooner than it would in .NET due to the slower performance of the ruby runtime. In practice this is not a problem.
2) Documentation
Microsoft do provide better documentation for the core libraries than Ruby or Rails, but the ruby/rails ones are still on the whole very good. I'd consider ruby/rails to be the winner here for the simple fact that you can always view the source for everything. No amount of documentation is a substitute for being able to actually see what's happening.
3) Community Support
I've been nothing but impressed by the community support around rails. I don't know what else to say there.
4) Hosting Solutions
Since phusion passenger got released, It seems to be easier these days to find rails hosting than it is to find ASP.net hosting. This is only going to sway more towards rails as time goes by for the simple fact that hosting companies do not have to pay royalties towards microsoft to deploy rails on linux servers.
5) Deployment ETC.
Capistrano (the most common deployment solution for rails) beats everything else hands down.
Well I dont know anything about the Scalability part, but personaly i started learning Ruby On Rails from ASP.NET a while ago. I really had a hard time finding some good documentation - the class documentation on Rails site was really poor in my eyes, and I had a simple question about what arguments you could put into an actionlink. But maybe it was just me who never found the right place. But personally i think that the ASP.NET documentation is better than rails - at least buy a book, i think thats a good way to go.
Number 3. Im pritty sure that there is very good Community Support for rails you just have to find the right forum or other media that suites your liking - maybe this what was I did wrong.
Number 4. There is alot of hosting solutions for Rails, but not as much as ASP.NET or PHP. I think you have to research this your self, and find out, if there is anything that suites your likeing.
Number 5. Ruby should be very easy to deploy, it has a notion of a development, test and production database. It uses migrations, so updates in the database schema is seamless - thats very cool. It is scripting, so it should be a matter of xcopy from the development computer to the production server.
The reason you should choose Ruby on Rails is if you like the MVC pattern. The MVC pattern is genius, and ruby is a great language when you learn it. Maybe take a dive into the ASP.NET MVC, and see what its like - then maybe move to Rails. Then you only have to learn a new language, and not a new arhitecture, framework and language at the same time.
Remmember this is from a ASP.NET Developer who sniffed to Rails, but gave up, doe to the lack of ability to find really good documentation, and there was always some strange errors, from the editor or Rails - but thats properbly a newbie thing :)
But if you have time, by all means learn it. Some developers say that we should learn one new language per year, and Ruby is a great candidate for that.

Resources