Skip to main content

Home/ Java Development/ Group items tagged creating

Rss Feed Group items tagged

Hendy Irawan

HowToConfigureExtendedWADL - Jersey: RESTful Web services made easy - wikis.sun.com - 0 views

  •  
    "This page describes how you can get an extended WADL from your REST app. It aligns mostly with the extended-wadl-webapp sample and uses these features: Add additional doc tags to the WADL Create JAXB beans from xsd - you might also create the schema from your beans Add the grammars element that includes the xsd file from which JAXB beans were generated to the WADL Add javadoc from your resource classes to the WADL, using most of the supported javadoc tags For getting the extended WADL as described above these things have to be done: Configure the maven-jaxb-plugin to create JAXB beans from xsd - this is described here just to describe what's done in the sample. Add the application-doc.xml and application-grammars.xml to the build classpath Configure the maven-javadoc-plugin with the ResourceDoclet provided by the wadl-resourcedoc-doclet artifact to create the resource-doc.xml. Create a subclass of WadlGeneratorConfig that defines/configures the WadlGenerators to use Specify your custom WadlGeneratorConfig in the web.xml as the WadlGeneratorConfig"
Merit Campus

Online Java Training - Creating threads - 0 views

  •  
    There are two ways to create threads. 1. Create Threads implementing Runnable interface 2. Create Threads Extending Thread class When to use Runnable interface Use Runnable interface when your class is extending some other class. Since in Java mulitple inheritance is not possible we use Runnable interface to create Threads.
Richard Boss

Steps to Configure Wowza and Create an Application - 0 views

  •  
    Read this post to know how to install and configure Wowza media server. And let's see basic steps to create an application on Wowza server.
tubagus99

Solve 'svn : Working copy is too old (format 10, created by Subversion 1.6)' - Eli - 0 views

  •  
    "Solve 'svn : Working copy is too old (format 10, created by Subversion 1.6)'"
Paul Sydney Orozco

How to create Dynamic Web Project in Eclipse - 0 views

  •  
    A tutorial on how to create a dynamic web project in eclipse
anonymous

untitled - 0 views

  • initWidget(uiBinder.createAndBindUi(this));
    • anonymous
       
      To inizialize the "menber variable" whith the widget object described in the XML view despription
  • uiBinder.createAndBindUi(this)
  • GWT compiler won't actually visit this URL to fetch the file, because a copy of it is baked into the compiler
  • ...15 more annotations...
  • @UiField have default visibility
  • UIObject
  • DivElement
  • If your factory method needs arguments, those will be required as attributes.
  • Every widget that is declared in a template is created by a call to GWT.create().
  • @UiConstructor annotation.
  • you can mark your own widgets with
  • CricketScores has no default (zero args) constructor
  • you can define a @UiFactory method on the UiBinder's owner
  • annotate a constructor of CricketScores with @UiConstructor.
  •   @UiFactory
  • public class UserDashboard extends Composite {  interface MyUiBinder extends UiBinder<Widget, UserDashboard> {}  private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);  public UserDashboard() {    initWidget(uiBinder.createAndBindUi(this));  }}
  • use several different XML templates for the same view
  • public interface Display
  • methods can be called to fill in attribute values
anonymous

Large scale application development and MVP - Part II - Google Web Toolkit - Google Code - 0 views

  • itself
    • anonymous
       
      The View Implementation
  • @UiHandler("
  • presenter.onAddButtonClicked();
  • ...91 more annotations...
  • onAddButtonClicked
  • eventBus.fireEvent(new AddContactEvent());
  • presenter needs to know more about the view
  • view needs to know more about the data model
  • data types are typically homogeneous within column borders
  • ColumnDefinition abstract class
  • houses the any type-specific code (this is the third party mentioned above)
  • ColumnDefinition
  • ColumnDefinition(s) would be created outside of the presenter
  • we can reuse its logic regardless of what view we've attached ourself to
  • update our views such that we can set their ColumnDefinition(s).
  • setColumnDefinitions
  • this.columnDefinitions = columnDefinitions;
  • so that we can pass in
  • a mocked ContactsView instance when testing our ContactsPresenter
  • in our AppController, when we create the ContactsView,
  • new ContactsViewColumnDefinitions().getColumnDefinitions();
  • we can initialize it with the necessary ColumnDefinition(s).
  • contactsView.setColumnDefiniions(
    • anonymous
       
      Initialize ContactsView with the necessary ColumnDefinition(s)
  • With our ColumnDefinition(s) we can pass the model untouched.
  • As mentioned above we were previously dumbing down the model into a list of Strings
  • current solution
  • List<String> data
  • display.setData(data);
  • how that data type is rendered.
  • use generics
  • third party that abstracts
  • knowledge of a cell's data type
  • stringing together a list of these classes
  • providing the necessary render()
  • and isClickable()/isSelectable() override
  • ContactsViewColumnDefinitions<ContactDetails>
  • columnDefinitions =      new ArrayList<ColumnDefinition<ContactDetails>>()
  • ColumnDefinition<T>
  • ContactsPresenter
  • ContactsViewImpl
  • ColumnDefinition<T> columnDefinition = columnDefinitions.get(j);
  • the presenter can pass the model untouched
  • the view has no rendering code
  • that we would otherwise need to test. And the fun doesn't stop there.
  • presenter.onItemClicked(
  • presenter.onItemSelected
  • ClickEvent
  • cell.getCellIndex()
  • columnDefinition.isClickable()
  • SelectEvent
  • columnDefinition.isSelectable()
  • return shouldFireClickEvent;
  • return shouldFireSelectEvent;
  • respond to user interaction in different ways based upon the cell type that was clicked
  • use them for rendering purposes
  • defining how to interpret user interactions
  • we're going to remove any application state from the ContactsView
  • replace the view's getSelectedRows() with a SelectionModel
  • The SelectionModel is nothing more than a wrapper around a list of model objects.
  • ContactsPresenter holds on to an instance of this class
  • onItemSelected
  • Having the ColumnDefinition create a new widget for each cell is too heavy
  • Replace our FlexTable implementation with an HTML widget
  • calling setHTML()
  • Reduce the event overhead by sinking events on the HTML widget
  • rather than the individual cells
  • update our ContactsView.ui.xml file to use a
  • HTML widget rather than a FlexTable widget.
  • <g:HTML ui:field="contactsTable">
  • Inefficiencies related to inserting new elements via DOM manipulation Overhead associated with sinking events per Widget
  • for each item ask our column definitions to render accordingly
  • each column definition
  • render itself into the StringBuilder
  • rather than passing back a full-on widget
  • calling setHTML on a HTML widget
  • rather than calling setWidget on a FlexTable.
  • This will decrease your load time, especially as your tables start to grow.
  • we're reducing the overhead of sinking events on per-cell widgets
  • instead sinking on a single container
  • ClickEvents are still wired up via our UiHandler annotations
  • get the Element that was clicked on
  • and walk the DOM until we find a parent TableCellElement
  • we can determine the row
  • shouldFirdClickEvent() and shouldFireSelectEvent()
  • to take as a parameter a TableCellElement rather than a HTMLTable.Cell.
  • faster startup times via Code Splitting.
  • runAsync() points
  • split portion of your code is purely segmented
  • not referenced by other parts of the app
  • it will be downloaded and executed at the point that it needs to run
  • Do we really want to download all of that code before the user even logs in?
  • Not really.
  • simply grab the login code, and leave the rest for when we actually need it
  • wrap the code that creates the ContactsView and ContactsPresenter in a runAsync() call
  • as optimizations such as this one become easier and easier to implement.
Hendy Irawan

Sapphire - 0 views

  •  
    Sapphire - develop UI without wiring individual widgets Little has changed in the way Java desktop UI is written since the original Java release. Technologies have changed (AWT, Swing, SWT, etc.), but fundamentals remain the same. The developer must choose which widgets to use, how to lay those widgets out, how to store the data being edited and how to synchronize the model with the UI. Even the best developers fall into traps of having UI components talk directly to other UI components rather than through the model. Inordinate amount of time is spent debugging layout and data-binding issues. Sapphire aims to raise UI writing to a higher level of abstraction. The core premise is that the basic building block of UI should not be a widget (text box, label, button, etc.), but rather a property editor. Unlike a widget, a property editor analyzes metadata associated with a given property, renders the appropriate widgets to edit that property and wires up data binding. Data is synchronized, validation is passed from the model to the UI, content assistance is made available, etc. This fundamentally changes the way developers interact with a UI framework. Instead of writing UI by telling the system how to do something, the developer tells the system what they intend to accomplish. When using Sapphire, the developer says "I want to edit LastName property of the person object". When using widget toolkits like SWT, the developer says "create label, create text box, lay them out like so, configure their settings, setup data binding and so on". By the time the developer is done, it is hard to see the original goal in the code that's produced. This results in UI that is inconsistent, brittle and difficult to maintain.
Hendy Irawan

WADL - Jersey: RESTful Web services made easy - wikis.sun.com - 0 views

  •  
    "Out of the box Jersey generates basic WADL at runtime that you can obtain from your REST app via GET http://path.to.your/restapp/application.wadl. Additionally you can configure Jersey to create an extended WADL including e.g. additional doc elements or javadoc read from your resource classes: There's a custom doclet that writes your javadoc to a file so that it can be used to extend the WADL. Additionally there's the maven-wadl-plugin that allows you to create the WADL without your running REST app."
Hendy Irawan

Bndtools - Simple, powerful OSGi tools for Eclipse - 0 views

  •  
    Bndtools is an Eclipse-based development environment for OSGi bundles and applications that focuses on: Ease of use and a rapid development lifecycle; Encouraging OSGi best practices; Producing accurate bundle metadata to maximise re-usability; Integration with offline build tools and users of other IDEs. See Features for a summary of Bndtools features. Bndtools is based on Bnd, the powerful bundle tool created by Peter Kriens. Please read Why Bndtools? to learn why Bndtools has been created and why you should use it for OSGi development in Eclipse.
anonymous

How Offshore Java Development Companies Create 2D Game In Java ME - 0 views

  •  
    With this article, we are going to provide you a quick introduction to Java ME development tools used by offshore Java Development vendors to create MIDlet. Java ME contains small JVM and a set of Java APIs that are used for developing mobile applications. So let's start and create your first mobile app with perfection.
mahesh 1234

Creating Api Document, Api Document, Creating Api Document Tutorial, Example - Javatpoint - 0 views

  •  
    Advantage of OOPs Naming Convention Object and Class Method Overloading Constructor static keyword this keyword Inheritance(IS-A) Aggregation(HAS-A) Method Overriding Covariant Return Type super keyword Instance Initializer block final keyword Runtime Polymorphism Dynamic Binding instanceof operator Abstract class Interface Package Access Modifiers Encapsulation Object class Object Cloning Java Array Call By Value strictfp keyword API Document Command Line Arg
Hendy Irawan

Creating JEE6 Vaadin Applications - Wiki - vaadin.com - 0 views

  •  
    Special thanks to Piero Sartini who came up with this alternative. It is basically the same as the previous alternative, but it uses the new JEE6 Context and Dependency Injection (CDI) and session scoped beans instead of EJBs. This alternative should have better performance than using EJBs. Instead of annotating the Vaadin application as a stateful session bean, it should be annotated using the @SessionScoped annotation, like so:
Paul Sydney Orozco

How to Add CRUD Capability On Spring MVC using Hibernate JPA - 0 views

  •  
    A step by step tutorial on adding CRUD (Create,Read,Update,Delete) capability on Spring MVC using Hibernate JPA.
anonymous

Getting Started with RequestFactory - Google Web Toolkit - Google Code - 0 views

  • Entity Proxies
    • anonymous
       
      Proxy type (on the Client) vs Entity type (on the server)
  • proxy types
  • entity types
  • ...147 more annotations...
  • methods that return service stubs
  • one RequestFactory interface for your application
  • employeeRequest();
  • @Service(Employee.class)
  • extends RequestContext
  • extends RequestFactory
  • service stub
  • RequestFactory service stubs
  • must extend RequestContext
  • The methods in a service stub do not return entities directly
  • return subclasses of com.google.gwt.requestfactory.shared.Request.
  • This allows the methods on the interface to be invoked asynchronously with
  • Request.fire()
  • fire(    new Receiver()
  • onSuccess
  • callers pass an AsyncCallback that implements onSuccess()
  • takes a Receiver which must implement onSuccess()
  • Receiver is an abstract class having a default implementation of onFailure()
  • you can extend Receiver and override onFailure()
  • onViolation()
  • any constraint violations on the server
  • The Request type returned from each method
  • parameterized with the return type of the service method.
  • Methods that have no return value should return type Request<Void>
  • BigDecimal, BigInteger, Boolean, Byte, Enum, Character, Date, Double, Float, Integer, Long, Short, String, Void
  • subclass of EntityProxy
  • List<T> or Set<T>
  • primitive types are not supported
  • methods that operate on an entity itself
  • like persist() and remove()
  • return objects of type InstanceRequest rather than Reques
  • Server Implementations
  • methods defined in an
  • entity's service interface
  • implemented in the class named
  • @Service annotation
  • in these examples, is the entity class
  • service implementations do not directly implement the RequestContext interface
  • server-side implementations use the domain entity types
  • @Entity
  • EntityManager
  • createQuery
  • getResultList();
  • entityManager()
  • createEntityManager()
  • em.persist(this);
  • em.remove(attached
  • em.close();
  • defined in the service's
  • RequestContext interface
  • even though the implementation does not formally implement the interface in Java
  • name and argument list for each method
  • same on client and server
  • Client side methods
  • return Request<T>
  • only T on the server
  • EntityProxy types become the domain entity type on the server
  • Methods that return a Request object in the client interface are implemented as static methods on the entity
  • Methods that operate on a single instance of an entity, like persist() and remove(),
  • eturn an
  • InstanceRequest
  • in the client interface
  • Instance methods do not pass the instance directly, but rather via the
  • using()
  • instance methods must be implemented as non-static methods in the entity type
  • Four special methods are required on all entities
  • as they are used by the RequestFactory servlet:
  • constructor
  • findEntity
  • An entity's getId()
  • is typically auto-generated by the persistence engine (JDO, JPA, Objectify, etc.)
  • "find by ID" method has a special naming convention
  • find()
  • "find" plus the type's simple name
  • On the server
  • getVersion() method is used by RequestFactory to infer if an entity has changed
  • backing store (JDO, JPA, etc.) is responsible for updating the version each time the object is persisted,
  • RequestFactoryServlet sends an UPDATE
  • if an entity changes as
  • Second, the client maintains a version cache of recently seen entities
  • Whenever it sees an entity whose version has changed, it fires
  • UPDATE events on the event bus
  • so that listeners can update the view
  • GWT.create
  • and initialize it with your application's EventBus
  • GWT.create
  • requestFactory.initialize
  • create a new entity on the client
  • EmployeeRequest request
  • EmployeeProxy newEmployee
  • All client-side code should use the EmployeeProxy
  • not the Employee entity itself
  • unlike GWT-RPC, where the same concrete type is used on both client and server
  • RequestFactory
  • designed to be used with an ORM layer like JDO or JPA
  • on the server
  • to build data-oriented (CRUD) apps with an ORM-like interface
  • on the client
  • easy to implement a data access layer
  • structure your server-side code in a data-centric way
  • GWT-RPC, which is service-oriented
  • On the client side, RequestFactory keeps track of objects that have been modified and sends only changes
  • lightweight network payloads
  • solid foundation for automatic batching and caching of requests in the future
  • RequestFactoryServlet
  • RequestFactory uses its own servlet
  • own protocol
  • not designed for general purpose services like GWT-RPC
  • implements its
  • It is designed specifically for implementing a persistence layer on both client and server.
  • In persistence frameworks like JDO and JPA, entities are annotated with
  • client-side representation of an entity
  • known as a
  • DTO (Data Transfer Object)
  • hook used to indicate that an object can be managed by RequestFactory
  • RequestFactory
  • EntityProxy interface
  • automatically populates bean-style properties between entities on the server and the corresponding EntityProxy on the client,
  • send only changes ("deltas") to the server
  • extends EntityProxy
  • interface
  • @ProxyFor
  • reference the server-side entity being represented
  • It is not necessary to represent every property and method from the server-side entity in the EntityProxy
  • EntityProxyId returned by this method is used throughout RequestFactory-related classes
  • while getId() is shown in this example, most client code will want to refer to
  • EntityProxy.stableId() i
  • to represent any type
  • is not required to expose an ID and version
  • often used to represent embedded object types within entities
  • @Embedded
  • Address
  • Address type
  • POJO with no persistence annotations
  • Address is represented as a ValueProxy
  • extends ValueProxy
  • interface
  • extends EntityProxy
  • interface
  • AddressProxy
  • AddressProxy
  • ValueProxy can be used to pass any type to and from the server
  • RequestFactory
  • interface between your client and server code
  • RequestContext interface
  • The server-side service
  • must implement each method
Gistia Labs

Learn Ruby on Rails Programming Language in Miami - 0 views

  •  
    Learning & creating an app on ruby on rails with Gistia Labs. We can help you to given ruby programming with training & you get job easily.
allen peter

Steps to create a servlet example in tomcat server - 0 views

  •  
    We give you the best way that How to Make a Java Servlet Using Tomcat.And This Topic also explains you that how to set up and use a Tomcat hosting server with great examples.
DJHell .

Evolutionary architecture and emergent design: Emergent design through metrics - 4 views

  •  
    Some of the common questions relating to cyclomatic complexity are "How does my code compare to others?" and "What is a good number for a particular class?" The iPlasma project answers these questions (see Resources). iPlasma is a platform, created as a university project in Romania, for quality assessment of object-oriented design. It generates a pyramid, showing key metrics for your project along with comparisons to industry-standard ranges for those numbers.
mahesh 1234

Simple Program of Java - 0 views

  •  
    In this page, we will learn how to write the hello java program. Creating hello java example is too easy. Here, we have created a class named Simple that contains only main method and prints a message hello java. It is the simple program of java.
1 - 20 of 51 Next › Last »
Showing 20 items per page