Broadleaf Commerce in Mobile Interface - spring

We are using Broadleaf Commerce Frameworks for our E-Commerce Application. I just want to know,
How this frameworks is compitable to Mobile Interface? If it is well compitable, I need to know how can we configure the same ?

Broadleaf Commerce is a server-side framework, but your question is more about frontend design. As far as mobile interfaces go, Broadleaf has no problem dealing with responsive pages or something like Spring Mobile. The only opinion Broadleaf makes about frontend technologies is using Thymeleaf as the templating language as opposed to something like JSP.
The Demo Site heat clinic out of the box is using a responsive design with media queries to modify CSS properties and resize various elements. We would recommend doing your templates this way rather than creating separate mobile templates as the continued maintenance cost of having your template code in 2 places becomes very high.

Related

Why in struts2 MVC is no direct link between the model and the view

I am starting with the Struts2 framework, so I am trying to get more knowledge about this framework.
First thing I did was learn something about that framework. So I read about Key Technologies Primer and there is one sentence that I don't understand.
The sentence (Section MVC):
...But, a direct link between the Model and the View is not practical for web applications...
Can you please explain this to me, Why that is not practical for web applications?
Thanks for your help all :)
Because of the paragraph above that one.
View/model interactions need to update server state, and the view layer is "split" in Java web apps (as opposed to Smalltalk MVC).
This design decision is no longer as relevant as it once was, but in the old Java web app world where action-based web apps were the norm, it made more sense.
Now that more web apps are client-side apps consuming server-side APIs this is a less-important consideration, but then you're no longer using the default (e.g., JSP) view layer of S2, rather you're using JSON as the view, and model/view interactions are handled on the client side through the server-side API.

can I Reuse Reactjs components for ReApp

I am leaning towards using Reactjs for our Web UI. Are there any resources/examples explaining how I can reuse or replace my Web based components emitting HTML with components supported by Reapp so that I can make a mobile app easily leveraging the same Actions and Stores?
2 places spring to mind:
https://reapp.io/ui.html
https://scotch.io/tutorials/creating-a-simple-shopping-cart-with-react-js-and-flux
Hope that helps

Front End Frameworks for RESTful backend

I am developing a RESTful backend using Spring framework. All the services are accessible through HTTP request methods (GET, POST, PUT, DELETE).
Could you please tell me what can the best combination of frameworks for front end?
Is it best to use SpringMVC or some other framework like Backbone is good enough?
If I am using SpringMVC for REST backend and also SpringMVC for front end then won't it be extra work doing same things again first for backend then for front end?
And most important I am confused about how can do the session management using front end?
Any help will be appreciated!
If you are looking into to make a SPA (Single Page App) make sure that you take a look at AmpersandJS -> http://ampersandjs.com/
Templates
Since you said "server-side" GUI, maybe you are thinking more along the lines of a template engine for creating HTML? This isn't really restful, but can be MVC like if you are forwarding from your Controller classes.
But PLEASE keep in mind that it would be a very BAD idea to try and generate XML or JSON data for consumption by RESTful clients (ajax) with either of these. Just say no to JSON creation from a template engine!
JSP is pretty much the standard for Java EE at the moment, or is most widely used. All you need is a compliant server, such as Tomcat/Jetty.
http://www.oracle.com/technetwork/java/javaee/jsp/index.html
Thymeleaf It looks a lot cleaner than JSP, and has the added benefit of not allowing all the pitfalls that can happen with a JSP (and there are a lot).
http://www.thymeleaf.org/
JavaScript:
When you say you are creating a RESTful backend, most people would make the conclusion (and rightfully so) that you are trying to develop a JavaScript MVVM client/GUI.
Kendo UI has a complete set of GUI widgets and MVVM framework that is specifically designed to work with a RESTful backend. But it's a paid for API.
http://www.telerik.com/kendo-ui
YUI3 (Yahoo User Interface) has a variety of widgets as well, and I've seen a lot of jobs requesting this. It has the advantage of being free/OSS as well. Older version are deprecated.
https://github.com/yui/yui3/wiki
knockout.js has been my favorite for MVVM engines that I've actually had experience working with. And it's simple to learn, in my opinion.
http://knockoutjs.com/
Angular.js Also free/oss, and works well with other GUI APIs.
https://angularjs.org/
I would suggest you to consioder Sencha Ext JS for front-end, it is one of the best framework and will work with RestFul back-end.
this is a good question, but I don't think there is a server-side framework out there specifically built to use a REST server backend. I think you could use Spring-MVC / Spring-Boot to get a good headstart, but you might also want to look into Rails or other Ruby any other modern web framework technology.

How to create a web application?

I have a question. I need to create a web application, which should work and look like a normal desktop app, so with windows, dialogs etc. without refreshing every time the site, but I am not sure what should I use for that. I have only a little experience with php (one rather simple site).
I suppose I need ajax on the client site to do that (maybe jQuery), but what should I use on the server site and how can I load e.g. whole page without refreshing site? Should I use PHP or python or something else? Maybe with some frameworks?
Thanks for any advice.
If you want to have rich client side interaction, consider using a MVC /MVVM js framework as:
backbone.js;
ember.js;
knockout.js;
angular.js.
Everyone has pros and cons, here you can find a smart comparison resource.
Once you download the bootstrap stuff [css, js, images], no page reloads will issue, and the app will flow like a desktop one.
All data is fetched from and persisted to the server: further request are made in JSON / XML format, in a RESTful fashion possibly.
You can setup such webservice in many many ways, among the others:
Sinatra (Ruby);
Symfony (PHP);
Django (python).
As I am more familiar with MS technologies I would use ASP.NET MVC, and then on the client side you can use Telerik controls which are good and free. jQuery is also a great option for the client side development. For developing ASP.NET MVC you can use the Visual Studio Express which is free as well.
However, I do not know your specifications. Maybe it would not be good enough for you. Another option that you have is using WPF (MS again), with which you can really develop very rich behavior web applications.

Optimizing Spring / Hibernate project for mobile devices

I have to optimize a Spring / Hibernate project (which was created without keeping mobile devices in mind) to be viewed in mobile devices such as iphone.
This project uses Spring MVC tags in the front end. Is it possible to attach a mobile friendly renderer to Spring MVC? (it is possible in JSF)
Otherwise what are the options available to me?
(My intention is to provide a mobile friendly UI for the existing project without changing the backend)
Spring MVC doesn't have tags for UI components that could be rendered differently. It just has low-level tags to render form fields, and messages.
If you want specific pages for the mobile app, you'll have to tweak the CSS, and/or rewrite the pages. It can help you with its support for themes, but you won't find any magic wand that converts an HTML page and give it mobile-friendly aspect.

Resources