Pure Java Development
Write your entire web application in Java—UI, logic, and events. No JavaScript required.
HTML as Objects
Every HTML element is a Java object. Use inheritance to create reusable components and polymorphism for flexible designs.
CSS as Methods
Apply styles with setBackgroundColor(), setPadding(), setDisplay(). Full IDE support.
Events as Listeners
Handle clicks, keypresses, and form submits with familiar listener patterns.
Browser APIs
Access Geolocation, Clipboard, Notifications, Storage, and 15 more browser APIs from Java.
Full Debugging
Set breakpoints anywhere. Step through UI logic. Inspect state with your IDE.
Refactor Freely
Rename, extract, inline—your IDE's refactoring tools work perfectly.
HTML Elements as Java Objects
Every HTML5 element has a corresponding Java class. Create, configure, and compose them programmatically.
// Create a navigation bar
Nav navbar = new Nav();
navbar.setBackgroundColor("#1e40af");
navbar.setPadding("16px 24px");
navbar.setDisplay(Display.FLEX);
navbar.setAlignItems(AlignItems.CENTER);
// Add logo
Anchor logo = new Anchor("/");
logo.setText("MyApp");
logo.setColor("#ffffff");
logo.setFontWeight("700");
logo.setFontSize("20px");
navbar.addElement(logo);
// Add navigation links
Ul navLinks = new Ul();
navLinks.setDisplay(Display.FLEX);
navLinks.setMarginLeft("auto");
navLinks.addStyleAttribute("list-style", "none");
navLinks.addStyleAttribute("gap", "24px");
for (String page : new String[] {"Features", "Pricing", "Docs"})
{
Li li = new Li();
Anchor link = new Anchor("/" + page.toLowerCase());
link.setText(page);
link.setColor("#ffffff");
li.addElement(link);
navLinks.addElement(li);
}
navbar.addElement(navLinks);
body.addElement(navbar);Browser APIs in Java
Oorian wraps 18 browser JavaScript APIs with type-safe Java classes—Geolocation, Clipboard, Notifications, Web Storage, Fullscreen, Speech, and more. Call a static method from Java, and the framework handles the JavaScript automatically. Results arrive as typed events delivered to your Java listener.
// Copy text to clipboard
ClipboardApi.writeText("Text to copy");
// Request geolocation (result via GeolocationListener)
GeolocationApi.getCurrentPosition(this);
// Show browser notification
NotificationApi.show(this, "Task Complete",
"Your report has been generated.");
// Store data in browser localStorage
StorageApi.setLocalItem("preference", "dark-mode");Object-Oriented Components
Use inheritance and polymorphism to build reusable, maintainable UI components.
// Base card component
public class Card extends Div
{
protected Div header;
protected Div body;
public Card()
{
setBackgroundColor("#ffffff");
setBorderRadius("12px");
setBorder("1px solid #e5e7eb");
addStyleAttribute("box-shadow", "0 2px 4px rgba(0,0,0,0.05)");
header = new Div();
header.setPadding("16px 20px");
header.setBorderBottom("1px solid #e5e7eb");
addElement(header);
body = new Div();
body.setPadding("20px");
addElement(body);
}
public Card setTitle(String title)
{
H3 h3 = new H3();
h3.setText(title);
h3.setMargin("0");
header.addElement(h3);
return this;
}
public Card addContent(Element content)
{
body.addElement(content);
return this;
}
}
// Specialized alert card
public class AlertCard extends Card
{
public AlertCard(String message, AlertType type)
{
super();
setBackgroundColor(type.getBackgroundColor());
setBorder("1px solid " + type.getBorderColor());
FaIcon icon = new FaIcon(FaIcon.SOLID, type.getIcon());
icon.setColor(type.getIconColor());
header.addElement(icon);
P text = new P();
text.setText(message);
body.addElement(text);
}
}
// Usage
Card userCard = new Card()
.setTitle("User Profile")
.addContent(new P("John Doe"))
.addContent(new P("john@example.com"));
AlertCard success = new AlertCard("Changes saved!", AlertType.SUCCESS);Type Safety Benefits
Catch errors at compile time, not runtime. Your IDE knows everything about your UI.
With Templates
- Typos in attribute names go unnoticed
- Wrong property types fail at runtime
- No autocomplete for element properties
- Refactoring breaks string references
With Oorian
- Misspelled methods won't compile
- Type mismatches caught by compiler
- Full autocomplete in every IDE
- Refactoring updates all references
Developer Benefits
No Context Switching
Stay in Java for everything. No jumping between Java, HTML templates, CSS files, and JavaScript.
Leverage Existing Skills
If you know Java, you can build Oorian applications. No new templating syntax or framework conventions to learn.
Full IDE Power
Autocomplete, go-to-definition, find usages, refactoring—everything works because it's all Java.
Compile-Time Safety
Catch UI errors before deployment. No runtime surprises from typos in template expressions.
Easy Testing
Unit test your UI components with standard Java testing tools. Mock dependencies, verify behavior.