SlideShare a Scribd company logo
1
A CROSS-DEVICE WEB FOCUSED
FRAMEWORK
THIAGO R. BUSTAMANTE
www.cruxframework.org
First… Who am I?
2
Thiago da Rosa de Bustamante
Java Architect & Crux founder.
thiago.bustamante@triggolabs.com
Master's Degree in Computer Science, UFMG – BR
BS in Computer Science, UFV - BR
3
Front-end
Framework
Secure and
Reliable
100%
Open Source
Mantained by:
What is Crux?
4
Cross-device
applications
Simplified
development
Powerful API
on the client’s side
Why Crux?
Adaptive Components
5
Single Contract (Write only one code)
Different screen sizes (Small or Large)
Different interaction
model (Touch,
Mouse, Arrows)
Development Model
6
(MVC)
Lots of other features
7
Dependency Injection on Client
Local
Database
REST
Offline
Support
Value Binding
Animations
(CSS3 / JS)
HTML5 APIs
Support
Open Social Support
Bootstrap 2.0 / 3.0
Integration
Apache Cordova
Integration
Demo!
9
VIEW screen: main.view.xml
<v:view
xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="http://www.cruxframework.org/view"
xmlns:faces="http://www.cruxframework.org/crux/smart-faces"
title="${messages.myContacts}"
useController="contactsController">
<faces:label id="title" text="${messages.myContacts}"/>
<faces:widgetList id="contacts" pageSize="25" >
<faces:lazyDataProvider onFetchData="contactsController.onFetchContacts"
onMeasureData="contactsController.onCountContacts"
dataObject="contact" autoLoadData="true"/>
<faces:widget>
<faces:label id="contactLabel" text="@{contact.lastName}, @{contact.firstName}"
onSelect="contactsController.onSelectContact"/>
</faces:widget>
</faces:widgetList>
<faces:navPanel id="controlPanel">
<faces:button id="edit" text="${messages.editContact}"
onSelect="contactsController.editContact"/>
<faces:button id="remove" text="${messages.removeContact}"
onSelect="contactsController.removeContact"/>
....
</faces:navPanel>
</v:view>
10
<v:view
xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="http://www.cruxframework.org/view"
xmlns:crux="http://www.cruxframework.org/crux/widgets"
xmlns:gwt="http://www.cruxframework.org/crux/gwt"
xmlns:faces="http://www.cruxframework.org/crux/smart-faces"
useController="contactInfoController"
onLoad="contactInfoController.onLoad"
title="${messages.contactInfo}">
<crux:formDisplay id="contactForm">
<crux:entry label="${messages.firstName}" horizontalAlignment="right">
<gwt:textBox id="txtFirstName" value="@{contact.firstName}" />
</crux:entry>
<crux:entry label="${messages.lastName}" horizontalAlignment="right">
<gwt:textBox id="txtLastName" value="@{contact.lastName}" />
</crux:entry>
<crux:entry label="${messages.email}" horizontalAlignment="right">
<gwt:textBox id="txtEmail" value="@{contact.email}" />
</crux:entry>
<crux:entry>
<faces:navPanel id="btnPanel" style="text-align:center;">
<faces:button id="btnSave" text="${messages.save}"
onSelect="contactInfoController.saveAddOrUpdate" />
<faces:button id="btnCancel" text="${messages.cancel}"
onSelect="contactInfoController.cancel"
/>
</faces:navPanel>
</crux:entry>
</crux:formDisplay>
VIEW screen: contact.view.xml
11
@Controller("contactInfoController")
public class ContactInfoController
{
@Inject
public MainViewControllers mainControllers;
private boolean newRecord;
@Expose
public void onLoad(ViewLoadEvent event)
{
Contact contact = event.getParameterObject();
newRecord = contact == null;
if (!newRecord)
{
View.of(this).write(contact);
}
}
private Contact getContact()
{
return View.of(this).read(Contact.class);
}
//...
CONTROLLER class: ContactInfoController.java
12
@DataObject("contact")
public class Contact implements Serializable
{
private static final long serialVersionUID = -848444894214013789L;
private String firstName;
private String lastName;
private String email;
public Contact()
{
}
public Contact(String firstName, String lastName, String email)
{
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
}
// getters and setters...
MODEL class: Contact.java
13
@RestService("contactService")
@Path("contact")
public class ContactService
{
@GET(cacheTime=GET.ONE_DAY)
@Path("size")
public Integer countContacts()
{
int result = 0;
// read the contact list size from database
return result;
}
@GET
@Path("all")
public Contact[] getContacts(@QueryParam("start")int startRecord,
@QueryParam("size")int pageSize)
{
Contact[] result = null;
// read the contact list from database
return result;
}
MODEL class: ContactService.java
14
@TargetRestService("contactService")
public interface ContactRestProxy extends RestProxy
{
void countContacts(Callback<Integer> callback);
void getContacts(int startRecord, int pageSize, Callback<List<Contact>> callback);
}
MODEL class: ContactRestProxy.java
15
@Controller("contactsController")
public class ContactsController
{
@Inject
public ContactRestProxy contractService;
@Expose
public void onCountContacts(final MeasureDataEvent<Contact> event)
{
contractService.countContacts(new Callback<Integer>()
{
@Override
public void onSuccess(Integer result)
{
event.getSource().setSize(result);
}
@Override
public void onError(Exception e)
{
MessageBox.show(e.getMessage(), MessageType.ERROR);
}
});
}
//...
CONTROLLER class: ContactController.java
Questions?
16
thiago.bustamante@triggolabs.com
www.cruxframework.org
Thiago Bustamante
Thanks.
17
Get in touch
thiago.bustamante@triggolabs.com
www.cruxframework.org
Thiago Bustamante

More Related Content

PPTX
SENCHA Web Programming Software
ODP
Introduction to Model View Controller
PPTX
Html5 offers 5 times better ways to hijack the website
PPTX
Javascript from beginning to modern
DOCX
Expirens RESUME Manoj kumar
PPTX
Who is the target audience for my thriller
PDF
GTL_Corporate_Presentation
PDF
Vipra nov 15
SENCHA Web Programming Software
Introduction to Model View Controller
Html5 offers 5 times better ways to hijack the website
Javascript from beginning to modern
Expirens RESUME Manoj kumar
Who is the target audience for my thriller
GTL_Corporate_Presentation
Vipra nov 15

Viewers also liked (16)

PDF
Faiz Aldalbhi CV English dated 17 Nov 15
PDF
Faiz Aldalbhi CV English dated 17 Nov 15
DOC
TEMBA. E, RESUME
PDF
Letting others lead
PDF
Norme de-aplicare a Legii 142/1998 privind tichetele de masa
PPTX
Mom's Back To School Essentials
PPTX
Non verbal communication
PPSX
Archive Recovery Software
PPTX
BHAKTI
PPTX
Sales pitch
PPTX
Sales pitch
PPTX
Proceso de paz (1)
PPTX
Are You Too Busy?
PDF
Teekait may 16
PDF
Mathematica. 3[1]
Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi CV English dated 17 Nov 15
TEMBA. E, RESUME
Letting others lead
Norme de-aplicare a Legii 142/1998 privind tichetele de masa
Mom's Back To School Essentials
Non verbal communication
Archive Recovery Software
BHAKTI
Sales pitch
Sales pitch
Proceso de paz (1)
Are You Too Busy?
Teekait may 16
Mathematica. 3[1]
Ad

Similar to Gwt.create - Presentation (20)

DOCX
Madhusudhakar_3.2_DotNet_BluestarInfotech
PDF
Security Architecture Consulting - Hiren Shah
PPTX
W3 conf hill-html5-security-realities
PPT
Top 10 HTML5 frameworks for effective development in 2016
PPT
Live Mesh Presentation Bruno Svc
PDF
Charan Grandhi_Resume
PPTX
Cross Platform Mobile Technologies
DOCX
Geethu Rajasekharan
PDF
cv-2016-23
DOCX
Sindhura Vallabhaneni
PPTX
Web application framework
PPTX
eswar.pptx
PPTX
Directions on microsoft_web_and_cloud_development
PDF
Bruce lawson-over-the-air
PPTX
2009 - Microsoft Springbreak: IIS, PHP & WCF
PPTX
Tecnologias Free e Open Source na Plataforma Microsoft
DOCX
Abhishek_Anand_Resume
PDF
Openshift visual workflows
PPTX
StrongLoop Overview
DOCX
Silverlight
Madhusudhakar_3.2_DotNet_BluestarInfotech
Security Architecture Consulting - Hiren Shah
W3 conf hill-html5-security-realities
Top 10 HTML5 frameworks for effective development in 2016
Live Mesh Presentation Bruno Svc
Charan Grandhi_Resume
Cross Platform Mobile Technologies
Geethu Rajasekharan
cv-2016-23
Sindhura Vallabhaneni
Web application framework
eswar.pptx
Directions on microsoft_web_and_cloud_development
Bruce lawson-over-the-air
2009 - Microsoft Springbreak: IIS, PHP & WCF
Tecnologias Free e Open Source na Plataforma Microsoft
Abhishek_Anand_Resume
Openshift visual workflows
StrongLoop Overview
Silverlight
Ad

Recently uploaded (20)

PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
iTop VPN Crack Latest Version Full Key 2025
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
CHAPTER 2 - PM Management and IT Context
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Wondershare Filmora 15 Crack With Activation Key [2025
iTop VPN Crack Latest Version Full Key 2025
Computer Software and OS of computer science of grade 11.pptx
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Advanced SystemCare Ultimate Crack + Portable (2025)
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Odoo Companies in India – Driving Business Transformation.pdf
Reimagine Home Health with the Power of Agentic AI​
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Digital Systems & Binary Numbers (comprehensive )
Why Generative AI is the Future of Content, Code & Creativity?
Download FL Studio Crack Latest version 2025 ?
Designing Intelligence for the Shop Floor.pdf
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free

Gwt.create - Presentation

Editor's Notes

  • #3: My name I am Brazilian Thanks organization Start with overview and show a demo
  • #4: Open Source, over GWT, develop Cross device apps Created to meet domestic needs We would like now to show it to GWT community. Can be helpful to others and help us to improve our tool Crux proven to be an excellent tool for large enterprise apps development. Example. Today, the main software, responsible for all custumer service, of largest telephone company in Brazil . 1.5 milion lines of code. 2 thousand screens
  • #5: A lot of reasons to use crux 1) prepared to assist the creation of applications that can adapt to different types of devices, such as smartphones, tablets, desktops or televisions 2) Provides a very simple and fast development model, making the creation and maintenance of software a more productive task 3) Provides a powerfull and extensive API to support the coding of the client layer
  • #6: To adapt to the type of device, does not means that we must ONLY to be responsive Responsve design is NOT ENOUGH. It is necessary to handle the differences in the interaction model of each kind of device The user experience using a mouse is different from experience using fingers or a remote control Crux provides Adaptive widgets. They can present themselves differently for each type of device Considering SCREEN SIZE and the TYPE OF INPUT supported by the device A compilation property maps the types of devices that we can handle. Different permutations are generated for each type of device
  • #7: Simple development model based on MVC design pattern. View layer consists of SCREENS. Each one created declaratively in a separated XHTML file. Each screen may be associated with one or more CONTROLLER classes. POJOs containing handlers for events fired on the screen. Crux is a PAGE ORIENTED framework, while still creates SINGLE PAGE APPLICATION. We have LOGICAL pages, which, PHYSICALLY, are loaded into the SAME DOCUMENT when they become necessary, bringing with them all the associated controllers. The model layer is composed by business classes located on the client side or on the server side, and can make use of our powerfull APIs
  • #8: Provides several APIs to assist the development, such as DEPENDENCY INJECTION on client side, Local DATABASE support REST communication Automatic VALUE BINDING between view files and controllers (SIMILAR TO THAT PROVIDED BY ANGULARJS)
  • #9: Now I want to show you a simple demonstration of crux usage. Simple application that shows a contact list here and allow us to add / remove / edit contacts into this list. The application has only 2 SCREENS and some operations on the server side that provides these data to the client.
  • #10: We can see HOW THE VIEW LAYER of the app was coded. We have TWO SEPARATED XML files, one for each screen. This is the FIRST ONE, that represents the main screen, containing the contact list. See how I18N messages can be REFERED inside VIEW files. Se how the CONTROLLER’S METHODS can be associated with widgets events See how VALUE BINDING is EASY with crux
  • #11: This file represents the second view of the app (Dialog). We have another example of Crux VALUE BINDING feature
  • #12: This is the controller used by the Dialog Screen. We have an EVENT HANDLER for the view loading event. See how to access, from the CONTROLLER layer, the dataObjects declared on the VIEW layer. Here I am transferring information from the Contact dataObject to the widgets on the Screen Then I am reading this dataObject from the screen
  • #13: See a simple mapping for a dataObject Simple POJO, that just need to use the DataObject ANNOTATION
  • #14: Example of how to create a REST service using Crux, at the server side. We are defining two operations here, One to return the number of contacts and other to retrieve a list of contacts Note that we have the RestService Annotation on this class that gives to it an alias .
  • #15: See how to define a proxy to automatically call the operations that we defined on our contactsService. Note that we point to the service that will be called through TargetRestService annotation. We just need to inform there the alias of the service we want to call.
  • #16: We can call the service operations through our proxy in a very similar way to GWT RPC feature With a better Performance, because of the cache policy we can use now. It is possible to see a simple example of our DEPENDENCY INJECTION feature here