WFF

wffweb - Java framework to develop web applications

View sample projects on GitHub

Web Firm Framework is an open source java framework powered by Apache. It may be used to build complicated web applications. The advantage of using this framework is its ability to generate html and css dynamically. In version-1.x.x, it provides features to generate html & css dynamically and some other sophisticated features for ui development. It also provides some inbuilt support for optimized html/css output. It supports html5 and css3 for the ui generation. We don’t have to keep any separate html/css files, instead we are keeping java files for ui (for html/css generation). A simple rest api or even servlet support is enough to create web applications with this framework. The performance rate will be very high with applications developed by this framework.

Since wffweb-2.x.x, it provides inbuilt support for client server bi-directional communication and many more. Check out Developers Guide for more info.

Whom is this framework for?

Developers who want to be a designer to develop very complex ui. Say for example, an online spreadsheet where each cell has many functionalities and each of the functionalities needs to be handled by independent/group of developers.

What are the advantages of this framework over other ui frameworks?

In other ui development frameworks, the developer may face some helpless situations to satisfy some ui features because of their limited control to the developer, in this framework the developer has full control over html & css generation. In other frameworks, the html to java data structure will be different so the developer has to keep different logic in the code, but here it is same so the developer is able to make a one to one mapping with html to java with less modifications. An html to java conversion tool is also provided in the webfirmframework website. In some complex ui development cases, we may have to keep a dedicated designer to develop the design html/css and the designer may be unaware of Java, in such cases we can convert these designed html/css to the corresponding wff java code. The designer will be able to understand the output html/css even if he/she doesn’t know the java because of the webfirm java code structure. It supports css3 and html5 and also a way to use custom css/html tags so that you will not have to wait for a new release to use new html tag or css.

The memory consumed by this framework is very low so you can build complete web application alone with this framework which can be run on any low cost low memory servers. If you are using client-server communication feature of wffweb-2.x.x, then you have to use server which supports websocket.

Why wffweb is amazingly fast.

There are couple of reasons for this

In a normal web application when you request for a page it consumes disks, memory and processor. The web application performance depends up on the speed of disk read operation, that's why we go for SSD solutions for performance gain.

But, when we use webfirmframework (wffweb) there is no disk read/write done as the complete web page is dynamically generated by logical programs. This makes it to gain the maximum performance which even an SSD solution can't make. And when you develop application with wffweb-2.x.x as a single page web application, only the required portions of the page are changed instead of the entire page. Therefore there is minimal logical operations done which makes minimal cpu/memory consumption (absolutely no disk read/write).

Server to Browser communication is another important factor for performance. A normal application communicates with http / https protocol. But, since wffweb-2.x.x it uses websocket for server-client bi-directional communication which eliminates the overhead of http / https communication.

In a normal web application you may have to handle server/ajax calls and a couple of JavaScript libraries for UI changes. This may cause the browser to consume more memory and cpu unless you handle it carefully thus the result for a huge project will be poor performance. But, in wffweb-2.x.x you don't have to manually handle any server calls and no additional libraries are required for UI updates. Nowadays, we buy third party ready made frameworks for styling UI, wffweb-2.x.x doesn't restrict using third party js/css/other libs in the project so you have the freedom to use any libraries.

When you develop your project with wffweb-2.x.x you will understand more reasons for the performance gain.

Why wffweb is highly secure

All UI logic may be kept at server side instead of client side while offering the freedom to keep the logic either at client side or server side.

When you use wss with wffweb-2.x.x which is more secure than an https communication as it reduces the risk of MITM attack.

How reliable it is

We ourselves use wffweb-2.x.x for all of our internal projects that makes us to bring new ideas or improvements it requires. As per our analytics, wffweb is used by around 300 new projects every month.

Sample code :-

Develop web application with Java code in the way you write HTML.

Html html = new Html(null) {{
	new Head(this);
	new Body(this) {{
		new NoTag(this, "Hello World");
	}};
}};

// prepends the doc type <!DOCTYPE html>
html.setPrependDocType(true);
System.out.println(html.toHtmlString()); 
alternatively
Html html = new Html(null);
new Head(html);
Body body = new Body(html);
new NoTag(body, "Hello World");

// prepends the doc type <!DOCTYPE html>
html.setPrependDocType(true);
System.out.println(html.toHtmlString()); 

prints the following output

<!DOCTYPE html>
<html>
<head>
</head>
<body>
Hello World
</body>
</html>
How to resolve dependency in different build tools

Check out how

Refer Developers Guide for more details

A demo app is deployed at https://wffweb.herokuapp.com