Skip to main content

Home/ SoftwareEngineering/ Group items tagged client

Rss Feed Group items tagged

kuni katsuya

5. Exception Handling - Confluence - 0 views

  • Exception Handling
  • 5. Exception Handling
  • server exceptions
  • ...41 more annotations...
  • can be handled on the
  • client-side
  • by defining a
  • fault callback
  • each remote call
  • very tedious
  • possible to define common handlers for particular fault codes on the client-side, and exception converters on the server-side, to convert server exceptions to common fault codes
  • define an
  • ExceptionConverter
  • class
  • Converter
  • ExceptionConverter
  • accepts(Throwable t, Throwable finalException)
  • convert( Throwable t, String detail, Map<String, Object> extendedData)
  • t.getMessage(), detail, t
    • kuni katsuya
       
      * instead of *wrapping* the server-side exception and rethrowing it to the client, ** extract only details relevant to the client (eg. include: human-friendly error message and any helpful parametrized data, exclude: stack traces), ** "wrap" it in a generic ServiceException, which gets "thrown" remotely to the client * client can check ServiceException.getCode() to implement behavior tailored to server-side exception 'type'
  • ENTITY_NOT_FOUND
    • kuni katsuya
       
      ENTITY_NOT_FOUND - 'fault code' understood by client
  • This class will
  • intercept
  • all EntityNotFound exceptions on the server-side, and convert it to a proper ENTITY_NOT_FOUND fault event.
  • exception converter has to be
  • declared on the GDS server config :
  • scan="true" in granite-config.xml
  • META-INF/granite-config.properties
  • in the jar containing the exception converter class
  • granite-config.xml
  • <exception-converters> <exception-converter type="com.package.SomeExceptionConverter"/> </exception-converters>
  • Flex side
  • Handler
  • Handler
  • IExceptionHandler
    • kuni katsuya
       
      **I**ExceptionHandler??? really?  ;)
  • accepts(emsg:ErrorMessage)
  • handle(context:BaseContext, emsg:ErrorMessage)
  • register it as an exception handler for the
  • Tide context
  • in a static initializer block to be sure it is
  • registered before anything else happens.
  • addExceptionHandler(EntityNotFoundExceptionHandler);
  • ExceptionConverter
  • 5. Exception Handling
  • 5. Exception Handling
  • 5. Exception Handling
kuni katsuya

Chapter 15. Data Management - 1 views

  •  abstractEntity.uid();
    • kuni katsuya
       
      sets the uid before persist
  •  UUID.randomUUID().toString();
  • AbstractEntity 
  • ...70 more annotations...
  • @MappedSuperclass
  • Important things on ID/UID
  • entity lives in three layers:
  • Flex client
  • JPA persistence context
  • database
  • When updating existing entities coming from the database
  • id is defined and is maintained in the three layers during the different serialization/persistence operations
  • when a new entity is being created in any of the two upper layers (Flex/JPA)
  • new entity has no id until it has been persisted to the database
  • most common solution is to
  • have a second persisted id, the uid
  • which is created by the client and persisted along with the entity
  • recommended approach to avoid any kind of subtle problems is to have a real uid property which will be persisted in the database but is not a primary key for efficiency concerns
  • You can now ask Tide to
  • limit the object graph before sending it
  • Flex with the following API :
  • EntityGraphUnintializer
  • uninitializeEntityGraph
  • Person object will be uninitialized
  • uperson contains
  • only the minimum of data
  • to correctly merge your changes in the server persistence context
  • Tide uses the
  • client data tracking
  • to determine which parts of the graph need to be sent
  • Calling the EntityGraphUninitializer manually is a bit tedious and ugly, so there is a cleaner possibility when you are using generated typesafe service proxies
  • annotate your service method arguments with @org.granite.tide.data.Lazy :
  • @Lazy
  • take care that you have added the [Lazy] annotation to your Flex metadata compilation configuration
  • in the Flex application, register the UninitializeArgumentPreprocessor component in Tide as follows :
  • [UninitializeArgumentPreprocessor]
  • all calls to PersonService.save() will
  • automatically use a properly uninitialized version
  • of the person argument.
  • 15.4. Dirty Checking and Conflict Handling
  • simplify the handling of data between Flex and Java EE
  • Chapter 15. Data Management
  • Tide maintains a client-side cache of entity instances and ensures that every instance is unique in the Flex client context
  •  uid().hashCode();
  • Tide currently only supports Integer or Long version fields, not timestamps and that the field must be nullable
  • in a multi-tier environment (@Version annotation)
  • highly recommended to use
  • JPA optimistic locking
  • highly recommended to add a
  • persistent uid field
  • AbstractEntity
  • in general this identifier will be
  • initialized from Flex
  • @Column(name="ENTITY_UID", unique=true, nullable=false, updatable=false, length=36)     private String uid;
  • @Version     private Integer version;
  • uid().equals(((AbstractEntity)o).uid())
  • consistent identifier through all application layers
  • @PrePersist
  • 15.3. Reverse Lazy Loading
  • 15.4. Dirty Checking and Conflict Handling
  • 15.4. Dirty Checking and Conflict Handling
  • 15.4. Dirty Checking and Conflict Handling
  • Dirty Checking and Conflict Handling
  • entity instance can be in two states :
  • Stable
  • Dirty
  • property meta_dirty is
  • bindable
  • could be used
  • to enable/disable a Save button
  • correct way of knowing if any object has been changed in the context, is to use the property meta_dirty of the Tide context
  • tideContext.meta_dirty
  • reliable when using optimistic locking
  • check that its @Version field has been incremented
kuni katsuya

Fiddler Web Debugger - Configuring clients - 0 views

  • Debug traffic from another machine (even a device or Unix box)
  • Allow remote clients to connect
  •  
    "HTTP application to use Fiddler? You can either directly configure the WinHTTP application to point to Fiddler, in code, or you can use the following command at the command prompt to tell WinHTTP to use Fiddler: On XP or below: proxycfg -p http=127.0.0.1:8888;https=127.0.0.1:8888 ...or this one to force WinHTTP to use WinINET's proxy settings: proxycfg -u On Vista or above, use an Elevated (admin) command prompt: netsh winhttp set proxy 127.0.0.1:8888 Note: On Windows 7 and earlier, netsh is bitness specific, so you may want to run the above command twice: first using the 32bit NETSH and then using the 64bit NETSH. This blog has more information. This issue was fixed in Windows 8; you can call either NetSh just once to set the proxy for both 32bit and 64bit WinHTTP hosts. Capture traffic from a different account, like ASP.NET on IIS or from a Windows Service? Trying to capture SOAP calls coming from ASP.NET or some background service process?  By default, Fiddler registers as the proxy only for the current user account (ASP.NET runs in a different user account). To get a background process (like the ASP.NET or IIS process) to use Fiddler, you must configure that process to use Fiddler. Typically, this is done by editing web.config or machine.config for the ASP.NET installation, or the configuration for the code running within the Windows Service. Please see http://msdn.microsoft.com/en-us/magazine/cc300743.aspx#S4 or the section on .NET or WinHTTP, depending on which network stack the service is using. Configure Windows Phone 7 to use Fiddler? Please see http://blogs.msdn.com/b/fiddler/archive/2011/01/09/debugging-windows-phone-7-device-traffic-with-fiddler.aspx for actual device hardware, or http://blogs.msdn.com/b/fiddler/archive/2010/10/15/fiddler-and-the-windows-phone-emulator.aspx for the emulator. Configure Google Nexus 7 (Andoid 4.1 Jellybean) to use Fiddler? Please see this page. Configure Android Emulator to use Fiddler? Please see http://au
kuni katsuya

BlazeDS Developer Guide - 0 views

  • Serializing between ActionScript and Java
  • java.util.Date (formatted for Coordinated Universal Time (UTC))
  • java.util.Date, java.util.Calendar, java.sql.Timestamp, java.sql.Time, java.sql.Date
  • ...19 more annotations...
  • Object (generic)
  • java.util.Map
  • Array (dense)
  • java.util.List
  • List becomes ArrayList SortedSet becomes TreeSet Set becomes HashSet Collection becomes ArrayList
  • Array (sparse) java.util.Map java.util.Map
  • java.util.Map If a Map interface is specified, creates a new java.util.HashMap for java.util.Map and a new java.util.TreeMap for java.util.SortedMap.
  • BlazeDS passes an instance of java.util.ArrayList to parameters typed with the java.util.List interface and any other interface that extends java.util.Collection. Then these types are
  • sent back to the client as mx.collections.ArrayCollection instances
  • If you require normal ActionScript Arrays sent back to the client, you must set the legacy-collection element to true in the serialization section of a channel-definition's properties; for more information, see Configuring AMF serialization on a channel.
  • legacy-collection Default value is false. When true, instances of
  • java.util.Collection
  • are returned as
  • ActionScript Arrays
  • legacy-map Default value is false. When true, java.util.Map instances are serialized as an ECMA Array or associative array instead of an anonymous Object.
  • A typical reason to use custom serialization is to avoid passing all of the properties of either the client-side or server-side representation of an object across the network tier.
  • standard serialization scheme, all public properties are passed back and forth between the client and the server.
  • Explicitly mapping ActionScript and Java objects
  • Private properties, constants, static properties, and read-only properties, and so on, are not serialized
kuni katsuya

Chapter 15. Data Management - 0 views

  • Data Management
  • Tide maintains a client-side cache of entity instances and ensures that every instance is unique in the Flex client context
  • Tide provides an integration between the Flex/LCDS concept of managed entities and the server persistence context (JPA or Hibernate).
  • ...10 more annotations...
  • All entities marked as [Managed] are considered as corresponding to Hibernate/JPA managed entities on the server
  • It is highly recommended to use JPA optimistic locking in a multi-tier environment (@Version annotation
  • In conclusion, the recommended approach to avoid any kind of subtle problems is to have a real uid property which will be persisted in the database
  • but is not a primary key for efficiency concerns
  • Here all loaded collections of the Person object will be uninitialized so uperson contains only the minimum of data to correctly merge your changes in the server persistence context
  • Tide uses the client data tracking (the same used for dirty checking, see below) to determine which parts of the graph need to be sent.
  • Dirty Checking and Conflict Handling
  • Data Validation
  • Tide integrates with Hibernate Validator 3.x and the Bean Validation API (JSR 303) implementations, and propagate the server validation errors to the client UI components
  • Data Paging
kuni katsuya

Chapter 2. Usage Scenarios - 0 views

  • Client Options
  • client there are two main choices
  • standard Flex RemoteObject API
  • ...16 more annotations...
  • GraniteDS does not support the standard Consumer and Producer Flex messaging API
  • its own client implementations of these classes org.granite.gravity.Consumer and org.granite.gravity.Producer that provide very similar functionality
  • Tide remoting API with the GraniteDS/Tide server framework integration
  • most advanced features and greatly simplifies asynchronous handling and client data management
  • preferred for new projects
  • Server Options
  • two options
  • GraniteDS service factory
  • RemoteObject API,
  • GraniteDS support for externalization of lazily loaded JPA entities/collections, and support for scalable messaging though Gravity
  • GraniteDS/Tide service factory
  • Tide API
  • full feature set of Tide data management and further integration with data push through Gravity
  • complete support for Spring and Seam security or integration with CDI events
  • Tide/CDI/JPA2/Java EE 6 on JBoss 6/7 or GlassFish 3
  • If you are on a Java EE 6 compliant application server, it is definitely the best option
kuni katsuya

Chapter 14. Tide client framework - 0 views

  • Tide client framework
  • framework features
  • Dependency Injection
  • ...18 more annotations...
  • Event Bus
  • Contextual Components and Conversations
  • Contexts and Components
  • two main kinds of contexts:
  • global context
  • unique context that exists during the whole lifetime of the Flex application
  • compared to to the server-side session
  • conversation contexts
  • temporary contexts that can be created and destroyed at any time during the lifetime of the application
  • can exist simultaneously
  • isolated from each other
  • Components are stateful objects that can be of any ActionScript 3 class with a default constructor
  • have a name
  • A context is mostly a container for component instances
  • three available scopes:
  • session scope
  • conversation scope
  • event scope
  •  
    "Tide client framework"
kuni katsuya

Plummer's Mind: GraniteDS Tutorial: Intro to The Tide Client Framework - 0 views

  • GraniteDS Tutorial: Intro to The Tide Client Framework
  • only one per Application
  • Tide Context
  • ...2 more annotations...
  • Tide will automatically inject shared data and correctly route events without requiring the application developer to write their own mechanism for sharing information or explicitly registering event listeners
  • Tide events are a simplification on the already existing Flex event framework
kuni katsuya

A proper way for JPA entities instantiation « Paul Szulc's Blog - 0 views

  • A proper way for JPA entities instantiation
  • creating the entities I would like to focus in this post
  • JPA2.0 entities
  • ...31 more annotations...
  • UserService
  • UserDao
  • FacebookWS
  • User u
  • UserService uses UserDAO and FacebookWS
  • but don’t know how those dependencies are instantiated
  • And you shouldn’t really care, all that is important is that UserService depends on dao and webservice object.
  • BDD template given-when-then) tests are easy to read
  • @Entity
  • public class User
  • calling new User(“someName”,”somePassowrd”, “someOtherName”, “someOtherPassword”) becomes hardly readable and maintainable
  • code duplication
  • Maintaining this code would turn into a nightmare in no time
  • running the code above will throw an exception by the JPA provider,
  • since not-nullable password field was never set.
  • Joshua Blooch gives fine example of builder pattern.
  • Instead of making the desired object directly, the client calls a constructor (or static factory) with all of the required parameters and gets a builder object. Then the client calls setter-like methods on the builder object to set each optional parameter of interest. Finally, the client calls a parameterless build method to generate the object, which is immutable. The builder is a static member class of the class it builds.
  • Coffee
  • public static class Builder
  • Builder(CoffeeType type, int cupSize)
  • Builder withMilk()
  • Coffee build()
  • Coffee(this)
  • private Coffee(Builder builder)
  • Coffee coffee = new Coffee.Builder(CoffeeType.Expresso, 3).withMilk().build();2}
  • especially if most of those parameters are optional.
  • For all entity attributes I create private fields
  • those that are obligatory become parameters for the public constructor
  • parameter-less constructor, I create one, but I give him
  • protected access level
  • protected
kuni katsuya

Chapter 11. Client-Side Validation API (JSR 303) - 0 views

  • Client-Side Validation API (JSR 303)
  • GraniteDS introduces an ActionsScript3 implementation of the Bean Validation specification and provides code generation tools integration so that your Java constraint annotations are reproduced in your AS3 beans
kuni katsuya

Chapter 14. Tide client framework - 0 views

kuni katsuya

Chapter 15. Data Management - 0 views

  • Data Management
  • Tide provides an integration between the Flex/LCDS concept of managed entities and the server persistence context (JPA or Hibernate)
  • Tide maintains a client-side cache of entity instances and ensures that every instance is unique in the Flex client context
  • ...5 more annotations...
  • highly recommended to use JPA optimistic locking in a multi-tier environment (@Version annotation)
  • Tip The easiest and recommended way for getting Tide enabled managed entities is to generate them from Java classes with Gas3 or the GDS Eclipse builder using the tide="true" option.
  • In a typical Flex/app server/database application, an entity lives in three layers: the Flex client the Hibernate/JPA persistence context the database
  • only invariant is the id.
  • id reliably links the different existing versions of the entity in the three layers
kuni katsuya

Interview of GraniteDS founders | RIAgora - 0 views

  • explained the origin of GraniteDS and the differences with LiveCycle Data Services
  • ActionScript3 reflection API
  • GraniteDS 2.2
  • ...8 more annotations...
  • JSR-303 (“Bean Validation”) ActionScript3 framework for form validation
  • validation framework is a specific adaptation of the JSR-303 (Bean Validation) specification to Flex: like its Java counterpart, it relies on validation annotations placed on bean properties and provides an engine API that lets you validate your forms without writing by hand a specific validator for each of your input fields
  • code generation tools provided by GraniteDS so that when you write your Java entity bean with validation annotations, they are automatically replicated in your ActionScript3 beans
  • problem with LCDS is mainly that it promotes a strict “client / server” architecture, with – roughly speaking – a heavy Flex client application connected to a server almost reduced to a database frontend
  • big majority of  these organizations use BlazeDS, a free and open-source subset of LCDS
  • need more advanced mechanisms than just Remoting start looking for open-source libraries to enable deeper integrations with the Java business layer, and GraniteDS is for sure the most popular project
  • “Flex Data Services” (now renamed to “Live Cycle Data Services”)
  • Flex Data Services seemed too “client-centric”
kuni katsuya

Plugins - Jenkins - Jenkins Wiki - 0 views

  • Git Plugin — This plugin allows use of Git as a build SCM
  • Subversion Plugin — This plugin adds the Subversion support (via SVNKit) to Jenkins
  • Subversion Release Manager — This plugin allows you to set up a job in Hudson for building specific revisions of a project.
  • ...77 more annotations...
  • Subversion Tagging Plugin — This plugin automatically performs subversion tagging (technically speaking svn copy) on successful build.
  • ViewVC Plugin — This plugin integrates ViewVC browser interface for CVS and Subversion with Hudson.
  • Source code management
  • Build Pipeline Plugin — This plugin creates a pipeline of Hudson\Jenkins jobs and gives a view so that you can visualise it.
  • Build tools
  • JBoss Management Plugin — This plugin allows to manage a JBoss Application Server during build procedure
  • Maven 2 Project Plugin — Jenkin's Maven 2 project type
  • Phing Plugin — This plugin allows you to use Phing to build PHP projects.
  • Post build task — This plugin allows the user to execute a shell/batch task depending on the build log output. Java regular expression are allowed.
  • Promoted Builds Plugin — This plugin allows you to distinguish good builds from bad builds by introducing the notion of 'promotion'.
  • Publish Over SSH Plugin — Publish files and/or execute commands over SSH (SCP using SFTP)
  • Selenium AES Plugin — This plugin is for continuous regression test by Selenium Auto Exec Server (AES).
  • Vagrant Plugin — This plugin allows booting of Vagrant virtual machines, provisioning them and also executing scripts inside of them
  • Unicorn Validation Plugin — This plugin uses W3C's Unified Validator, which helps improve the quality of Web pages by performing a variety of checks.
  • Build wrappers
  • Android Emulator Plugin — Lets you automatically generate, launch and interact with an Android emulator during a build, with the emulator logs being captured as artifacts.
  • Artifactory Plugin — This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.
  • AWS Cloudformation Plugin — A plugin that allows for the creation of cloud formation stacks before running the build and the deletion of them after the build is completed.
  • Build Keeper Plugin — Select a policy for automatically marking builds as "keep forever" to enable long term analysis trending when discarding old builds - or use to protect logs and artifacts from certain builds
  • Build Name Setter Plugin — This plugin sets the display name of a build to something other than #1, #2, #3, ...
  • SSH plugin — You can use the SSH Plugin to run shell commands on a remote machine via ssh.
  • SeleniumRC Plugin — This plugin allows you to create Selenium server instance for each project build.
  • Vagrant Plugin — This plugin allows booting of Vagrant virtual machines, provisioning them and also executing scripts inside of them
  • Timestamper — Adds timestamps to the Console Output.
  • VirtualBox Plugin — This plugin integrates Jenkins with VirtualBox (version 3, 4.0 and 4.1) virtual machine.
  • Version Number Plugin — This plugin creates a new version number and stores it in the environment variable whose name you specify in the configuration.
  • VMware plugin — This plugin allows you to start a VMware Virtual Machine before a build and stop it again after the build completes.
  • AWS Cloudformation Plugin — A plugin that allows for the creation of cloud formation stacks before running the build and the deletion of them after the build is completed.
  • Desktop Notifier for Jenkins — This is useful for those who are looking for a Desktop Notifier for Jenkins builds to automatically notify you about failed builds directly from their desktops.
  • Email-ext plugin — This plugin allows you to configure every aspect of email notifications. You can customize when an email is sent, who should receive it, and what the email says.
  • Google Calendar Plugin — This plugin publishes build records over to Google Calendar
  • HTML5 Notifier Plugin — Provides W3C Web Notifications support for builds.
  • Jabber Plugin — Integrates Jenkins with the Jabber/XMPP instant messaging protocol. Note that you also need to install the instant-messaging plugin.
  • Build reports
  • Checkstyle Plugin — This plugin generates the trend report for Checkstyle, an open source static code analysis program. 
  • Clover PHP Plugin — This plugin allows you to capture code coverage reports from PHPUnit. For more information on how to set up PHP projects with Jenkins have a look at the Template for Jenkins Jobs for PHP Projects.
  • Crap4J Plugin — This plugin reads the "crappy methods" report from Crap4J. Hudson will generate the trend report of crap percentage and provide detailed information about changes.
  • Dependency Analyzer Plugin — This plugin parses dependency:analyze goal from maven build logs and generates a dependency report
  • Dependency Graph View Plugin — Shows a dependency graph of the projects using graphviz. Requires a graphviz installation on the server.
  • FindBugs Plugin — This plugin generates the trend report for FindBugs, an open source program which uses static analysis to look for bugs in Java code. 
  • Grinder Plugin — This plugin reads output result files from Grinder performance tests, and will generate reports showing test results for every build and trend reports showing performance results across builds.
  • JSUnit plugin — This plugin allows you publish JSUnit test results
  • Performance Plugin — This plugin allows you to capture reports from JMeter and JUnit . Hudson will generate graphic charts with the trend report of performance and robustness.
  • PerfPublisher Plugin — This plugin generates global and trend reports for tests results analysis. Based on an open XML tests results format, the plugin parses the generated files and publish statistics, reports and analysis on the current health of the project.
  • PMD Plugin — This plugin generates the trend report for PMD, an open source static code analysis program. 
  • Sonar plugin — Quickly benefit from Sonar, an open-source dashboard based on many analysis tools like Checkstyle, PMD and Cobertura.
  • testng-plugin — This plugin allows you to publish TestNG results.
  • Violations — This plug-in generates reports static code violation detectors such as checkstyle, pmd, cpd, findbugs, codenarc, fxcop, stylecop and simian.
  • xUnit Plugin — This plugin makes it possible to publish the test results of an execution of a testing tool in Jenkins.
  • Artifact uploaders
  • ArtifactDeployer Plugin — This plugin makes it possible to copy artifacts to remote locations.
  • Artifactory Plugin — This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.
  • Confluence Publisher Plugin — This plugin allows you to publish build artifacts as attachments to an Atlassian Confluence wiki page.
  • Deploy Plugin — This plugin takes a war/ear file and deploys that to a running remote application server at the end of a build
  • FTP-Publisher Plugin — This plugin can be used to upload project artifacts and whole directories to an ftp server.
  • HTML Publisher Plugin
  • Publish Over FTP Plugin — Publish files over FTP
  • Publish Over SSH Plugin — Publish files and/or execute commands over SSH (SCP using SFTP)
  • S3 Plugin — Upload build artifacts to Amazon S3
  • SCP plugin — This plugin uploads build artifacts to repository sites using SCP (SSH) protocol.
  • Hudson Helper for Android — Monitor your CI builds right from your Android device.
  • Hudson Mobi, the iPhone, iPod and Android client for Hudson CI — The iPhone, iPod and iPad client for Hudson CI monitoring on the road.
  • Hudson Monitor for Android — Monitor and display the status of your builds on your Android™ phone.
  • External site/tool integrations
  • Jira Issue Updater Plugin — This is a Jenkins plugin which updates issues in Atlassian Jira (by changing their status and adding a comment) as part of a Jenkins job.
  • JIRA Plugin — This plugin integrates Atlassian JIRA to Jenkins.
  • ChuckNorris Plugin — Displays a picture of Chuck Norris (instead of Jenkins the butler) and a random Chuck Norris 'The Programmer' fact on each build page.
  • UI plugins
  • Active Directory plugin — With this plugin, you can configure Jenkins to authenticate the username and the password through Active Directory.
  • Audit Trail Plugin — Keep a log of who performed particular Jenkins operations, such as configuring jobs.
  • JClouds Plugin — This plugin uses JClouds to provide slave launching on most of the currently usable Cloud infrastructures.
  • Checkstyle Plugin — This plugin generates the trend report for Checkstyle, an open source static code analysis program. 
  • FindBugs Plugin — This plugin generates the trend report for FindBugs, an open source program which uses static analysis to look for bugs in Java code. 
  • JIRA Plugin — This plugin integrates Atlassian JIRA to Jenkins.
  • M2 Release Plugin — This plugin allows you to perform a release build using the maven-release-plugin from within Jenkins.
  • PMD Plugin — This plugin generates the trend report for PMD, an open source static code analysis program. 
  • Meme Generator Plugin — Generate Meme images when a build fails (and returns to stable), and post them on the project page.
kuni katsuya

BlazeDS Developer Guide - BlazeDS client architecture - 0 views

kuni katsuya

Lazy Loading Entities In Views Challenge--Reader's Question And Answer : Adam Bien's We... - 0 views

  • Lazy Loading Entities In Views
  • class User
  • Address
  • ...10 more annotations...
  • Friend
  • addresses are lazily loaded
  • detached mode already in the controller
  • eagerly loaded
  • It gets ugly pretty quickly
  • JXPath relations
  • Use Fetch Joins they are designed to prefetch lazy relations
  • Anti-Pattern
    • kuni katsuya
       
      DO NOT USE THE OPEN-SESSION-IN-VIEW *ANTI*-PATTERN
  • Use Stateful Session Beans
    • kuni katsuya
       
      do not penalty: death, or at least a public flogging
  • eager load the relations
    • kuni katsuya
       
      just don't hard-code this eager loading behavior by using jpa's FetchType.EAGER when annotating the entity beans if you do, you force all clients of said entity beans to *always* eager fetch everything, even if the client doesn't want/need the full depth/breadth of the object graph to eager load the relations when needed, try fetch joins (see item 5)
kuni katsuya

Login for Server-side Apps - Facebook Developers - 0 views

  • compare it to the same state variable stored client-side in the session
    • kuni katsuya
       
      cross-site request forgery defense mechanism
  • If the user decided to decline to authorize your app
  • YOUR_REDIRECT_URI
  • ...38 more annotations...
  • error_reason=user_denied
  • Handling Revoked Permissions to see how best to proceed
  • Step 6. Exchange the code for an Access Token
  • exchange it for a User access token that can then be used to make API requests
  • /oauth/access_token
  • server-side request to the following OAuth endpoint:
  • client_secret
  • code=CODE_GENERATED_BY_FACEBOOK
  • body of the response
  • access_token
  • USER_ACCESS_TOKEN
  • persist this User access token in your database or in a session variable
  • must have the same base domain as that specified in the App Domain property of your app's settings
  • URL of the form https://apps.facebook.com/YOUR_APP_NAMESPACE
  • scope=user_birthday,read_stream
  • Step 4. Add Permissions to Login Dialog request
  • comma-separated list of any of the Permissions available
  • Step 5. Handle the response from the Login Dialog
  • Step 5. Handle the response from the Login Dialog
  • Step 5. Handle the response from the Login Dialog
  • Step 5. Handle the response from the Login Dialog
  • YOUR_REDIRECT_URI
  • Step 3. Redirect the user to the Login Dialog
  • Login for Server-side Apps
  • Login for Server-side Apps
  • Login for Server-side Apps
  • Login for Server-side Apps
  • Login for Server-side Apps
  • Login for Server-side Apps
  • way to authenticate users in situations where the use of client-side Javascript is not appropriate.
  • Login for Server-side Apps
  • received an access token for them and can make API calls on their behalf
  • Step 5. Handle the response from the Login Dialog
  • include CSRF protection using the state parameter
  • if the user has authorized the app, they will be redirected to:
  • YOUR_REDIRECT_URI
  • code=CODE_GENERATED_BY_FACEBOOK
  • redirect_uri as the same URL that redirect the user to the Login Dialog
kuni katsuya

Fiddler Web Debugger - Configuring clients - 1 views

1 - 20 of 65 Next › Last »
Showing 20 items per page