webfirmframework for Java Experts

FAQ

If your question has no answer in this FAQ, please let us know by email @ tech-support@webfirmframework.com we will answer it ASAP.


Is it possible to create single page application with wffweb?

Yes, it's mainly intended for single page application development.

When should I choose wffweb for ui development?

If you are developing single page application, highly secured ui (banking/financial products), mission critical ui development, business application, realtime application i.e. the applications which show realtime data in it, analytical applications, trading applications etc..

Can we create I/O intensive and CPU intensive apps with this framework?

Yes, that is one of the main advantages of this framework.

Is wffweb suitable for a normal web development?

Yes, but for a normal website (which doesn't have a user login) it's better to use any other MVC based framework.

Is there any platform dependency for this framework?

No, it's purely built by Java.

Is wffweb thread-safe?

Yes, wffweb-3.0.x is mainly released for thread-safety, reliability, security and stability improvements. So use the latest version to get better thread-safety.

Can we integrate third party APIs with wffweb app?

Yes

Is it possible to use external js, css files along with wffweb?

Yes, that's how an amazing ui can be built. Checkout these sample projects.

Do I have to use any specific application server to use wffweb?

No, wffweb has no dependency on any servers. You can configure wffweb for any server. wffweb can also be used with embedded servers like embedded jetty, embed tomcat etc..

Which is the stable final version of wffweb?

We haven't officially announced a stable final version yet as we have different stages of testing to be passed but the latest version is safe to use.

Is there any web ui feature that will be impossible to do with this framework?

There is nothing impossible with this framework. However, file upload and file download options should be handled in some other way (other framework/servlet) because currently it doesn't support multiplexing.

Is there any known demerits with this framework?

To gain more readability and maintenance flexibility we use anonymous class style coding in Java but sometimes it is referred to as an anti-design pattern. It has an initial first time performance impact if the tag hierarchy is heavy but it's only once in the whole life time (As of Java 10, it provides Application Class-Data Sharing to avoid this load time). And also this kind of development makes a method very lengthy unless it's properly managed/modularized. But if you don't like anonymous class style coding you can follow normal object creation coding style. It's always recommended to develop reusable components which will increase the productivity & maintenance comfortability. You can also maintain separate package (.jar) for the custom components (.class files).

With latest version of wffweb we can use functional style coding using AbstractHtml.give method instead of anonymous style coding. So now there is no more issue of anonymous class loading. Say good bye to anonymous class style coding. We can use this tool to convert HTML to Java functional style code.

Kotlin also solves the issue of Java anonymous class, using apply function block we can get the same readability as Java anonymous class style coding without generating anonymous class. Checkout this code from Kotlin wffweb sample project. Try this tool to convert HTML to Kotlin code.

In Java 10, it provides Application Class-Data Sharing which can be used to avoid this initial class loading time.

How wffweb is different from MVC framework?

In an MVC framework, the application is categorized in to three, i.e. Model, View and Controller. We have to write code for each part separately and need to connect each other. In wffweb, it introduces a new architecture for application called M-LT-P i.e. Model Logical-template Push. We have to write code for the Model and Logical-template only and the Push is handled by the framework itself. Any changes in the server side is updated with the browser by the framework, the developer doesn't have to write any webservice, server calls etc.. he can write coding just like a client side application, eg:- swing application.

How wffweb is different from a swing application?

In a swing application, we use ready made components/listeners like Button, TextField, ActionListener etc.. But wffweb is a web framework so we build html tags and attributes which can make a ui, for eg:- to show a text field we use new Input(null, new Type(Type.TEXT)). You can build your own components to reuse it. The events in wffweb is handled by event attributes like OnClick, OnChange etc.. which can be used to handle event either at server side, client side or both sides.

Is it possible to generate an extremely large & complicated HTML (used for reporting purpose) with toHtmlString/toOutputStream methods?

Yes, but they consume memory while generating HTML string (if the tag hierarchy contains a deep nested tags) so if there is no enough memory available while generate the HTML string then it might throw an error. In such case, there are alternative methods introduced in the latest version, they are toBigHtmlString and toBigOutputStream. The toBigHtmlString and toBigOutputStream methods will never throw any error but may be slower than toHtmlString/toOutputStream methods.

Is there any way to generate formatted HTML, or by toHtmlString method?

No, the toHtmlString method returns the minified HTML. This framework doesn't provide any way to get formatted/pretty print HTML. There are third party java libraries available to format HTML.

Does this framework provide ready made widgets/web components?

No, it doesn't provide any ready made widgets/web components because style & element structure of widgets/web components will depend on a css file. It is independent of any CSS & JavaScript frameworks. That is the major advantage of webfirmframework, we can use any CSS/JavaScript frameworks along with this framework. You have to build your own widgets/web components with your preferred CSS framework. You can refer these sample projects with different css frameworks.

What are the changes need to be done to migrate wffweb-2.x.x app to wffweb-3.x.x?

wffweb-3.x.x requires minimum of Java 8. Upgrade your project jdk/jre to Java 8 or later and recompile the project. No code changes are required for wffweb-3.0.0 but later version might need some minor code changes. Eg: in wffweb-3.0.1 or later the Style.getCssProperties method returns an unmodifiable collection of CssProperty.

What technical knowledge should I have to get started with this framework?

Basic JavaScript knowledge and an expertise in Java programming language. It's nice to have good knowledge in HTML and CSS but if your ui is designed by a UI/UX designer then you can convert that HTML templates using this tool.

How can I develop realtime analytical/data visualization app (eg: realtime graphs/charts etc..) using wffweb?

If you want to develop highly customizable realtime graph/chart, you must be well verse with developing ui with svg tag. wffweb provides svg tag, attributes, custom tag and custom attribute. You can update svg tag & its children from the server side code (Java/Kotlin). This is also a great optimization for data transfer because only the needful data is sent to the client. If you want a sample, please send us an email to tech-support@webfirmframework.com from your official email address we will send you sample ASAP.

If you are using any js libraries to develop graph/chart it will be limited for customizations and may not be able to satisfy all of your requirements at least in future. This is the reason why encourage you for using svg tag with your own logic instead of third party js libraries.

Do we need Java EE to build/run wffweb app?

Absolutely not, we need only Java 8 or later (if wffweb-3.x.x) and any application server like tomcat. There is no dependency over any Java EE classes.

Is it possible to scale wffweb app?

Yes, please contact tech support if you are using wffweb 3. If you are using wffweb 12 you can use a load balancer without configuring sticky session in it. read more in wffweb 12 features page. Checkout this sample code here.

How to use microservice with wffweb app?

Please contact tech support.

Can we use embed tomcat to run wffweb app?

Yes

Can we run wffweb app in docker container?

Yes

Does wffweb support URL rewriting/routing?

Yes, wffweb-12 provides it. wffweb-3 is not yet supported. Checkout this sample project .