SpatialKey blends business intelligence and mapping, letting decision makers create and share interactive reports in minutes.
WESTFIELD, MA. — September 28, 2009— Today, the SpatialKey (http://spatialkey.com) business unit of Universal Mind (http://universalmind.com) announced the release of its location intelligence software, SpatialKey On-Demand. SpatialKey On-Demand enables decision makers to create and share map-based, interactive analyses and reports. SpatialKey is an easy-to-use, software as a service (SaaS) enterprise solution that is priced for departmental-level budgets. It can be deployed and used in minutes by end users without training or IT support. SpatialKey On-Demand has successfully concluded a beta period, and is available today. Users can sign up for a free 30-day trial at: http://spatialkey.com/signup.
Information in the quest for better Apps across Mobile, Tablet, Android, iOS and Blackberry with a hint of Flex, AIR, LCDS and BlazeDS
Tuesday, September 29, 2009
Leveraging JPA with BlazeDS and LiveCycle Data Services
MAX Presentation:
The Java Persistence API (JPA) was introduced to provide vendor neutral persistence to Plain Old Java Objects (POJOs). In this session, we will introduce JPA and show how the RIA developer can leverage JPA Annotations with LiveCycle Data Services, Spring, and BlazeDS to create a powerful persistence architecture through annotated domain objects.
Speakers: Brian O'Connor, Chris Scott, Ryan Campbell
Wednesday - October 7th @ 3:30pm
Room: 512
The Java Persistence API (JPA) was introduced to provide vendor neutral persistence to Plain Old Java Objects (POJOs). In this session, we will introduce JPA and show how the RIA developer can leverage JPA Annotations with LiveCycle Data Services, Spring, and BlazeDS to create a powerful persistence architecture through annotated domain objects.
Speakers: Brian O'Connor, Chris Scott, Ryan Campbell
Wednesday - October 7th @ 3:30pm
Room: 512
Thursday, October 23, 2008
Flex Camp in Boston - December 12th, 2008
In case you missed the last Boston Flex User Group Presentation I gave on Flex/Cairngorm/AIR & LCDS you have another opportunity to see it again at Flex Camp on December 12th. This looks like it will be the one hour version but with some new information as well. The agenda looks packed with great speakers and topics. They have lined up Tim Buntel, Christophe Coenraets, Andrew Powell, Jeff Tapper, and Mike Nimer for different presentations. It should be a very interesting and informative day.
Check out the agenda:
http://www.flexcampboston.com/page.cfm/agenda
Hope to see you there...
Check out the agenda:
http://www.flexcampboston.com/page.cfm/agenda
Hope to see you there...
Thursday, October 16, 2008
Using a DataService in AIR to cache complex Data without LCDS Data Management (Part II)
Ok, as I said in the previous post, one of the most powerful features of a DataService in AIR is its ability to cache complex data either automatically or by calling DataService.saveCache(). Usually this is done by calling the fill() method on a DataService/Assembler while connected to LCDS and retrieving a Collection of managed Value Objects. In most cases the Value Objects have a nested hierarchy. To save this data for offline use in AIR you can simply set "autoSaveCache" to "true" on the DataService or you can call DataService.saveCache() explicitly.
I personally have a need to know when a fill() operation has finished downloading data to AIR from an Assembler. The ResultEvent associated with the AsyncToken on the fill() call is not a reliable indicator. Hopefully this will change in future versions of Flex/AIR/LCDS.
So, if you have a need to store data for offline use in AIR and can't use LCDS Data Management then simply use Remote Objects. This is how it works....
Create a DataService in AIR like this: (You can also just create this in ActionScript)
Compile it against data-management-config.xml if you want but it doesn't matter because you will never connect this DataService to LCDS Data Management.
Here is the trick....
A DataService will store data to SQLite if you call DataService.saveCache(). The restriction is that it stores the data to disk but only associated with how you called "fill()". In order to get the data back while offline you simply need to call fill() again the same EXACT way with the same arguments.
When you call fill() on a DataService you will pass the method an ArrayCollection; at the very least. So, call fill() when you are disconnected. This will associate the ArrayCollection to the DataService's fill() call. Then you can make a RemoteObject call that returns an ArrayCollection of complex Value Objects. Add the contents of this RemoteObject Collection to the collection associated with the fill() call on the DataService. Then call DataService.saveCache().
You have successfully associated the data from the remote object call with the DataService and if you close the AIR Application, open it again and call fill() the same way you originally did the data is available for you to use offline.
In summary:
1. Create an ArrayCollection called "dataServiceAC"
2. Call DataService.fill(dataServiceAC);
3. Call RemoteObject.getData() and get an ArrayCollection called remoteAC.
4. Add the contents of remoteAC to dataServiceAC.
5. Call DataService.saveCache();
6. Close the application.
If you need the data again when you re-open the AIR Application simply call fill() again the same EXACT way you did before...
I have this up and working and it seems to be a good solution when you need an indication that your data in available or finished loading.
Warning!!! Caching data to SQLite through a DataService may have performance issues depending on the complexity of the data and the number of rows. I am noticing is gets slow at around 20K rows with simple data and at about 4K rows with complex data or data with a complex nested hierarchy.
I personally have a need to know when a fill() operation has finished downloading data to AIR from an Assembler. The ResultEvent associated with the AsyncToken on the fill() call is not a reliable indicator. Hopefully this will change in future versions of Flex/AIR/LCDS.
So, if you have a need to store data for offline use in AIR and can't use LCDS Data Management then simply use Remote Objects. This is how it works....
Create a DataService in AIR like this: (You can also just create this in ActionScript)
mx:DataService id="sampleDataService"
destination="sample"
autoCommit="false"
autoSaveCache="false"
autoConnect="false"
autoMerge="false"
cacheID="sampleId"
autoSyncEnabled="false"
Compile it against data-management-config.xml if you want but it doesn't matter because you will never connect this DataService to LCDS Data Management.
Here is the trick....
A DataService will store data to SQLite if you call DataService.saveCache(). The restriction is that it stores the data to disk but only associated with how you called "fill()". In order to get the data back while offline you simply need to call fill() again the same EXACT way with the same arguments.
When you call fill() on a DataService you will pass the method an ArrayCollection; at the very least. So, call fill() when you are disconnected. This will associate the ArrayCollection to the DataService's fill() call. Then you can make a RemoteObject call that returns an ArrayCollection of complex Value Objects. Add the contents of this RemoteObject Collection to the collection associated with the fill() call on the DataService. Then call DataService.saveCache().
You have successfully associated the data from the remote object call with the DataService and if you close the AIR Application, open it again and call fill() the same way you originally did the data is available for you to use offline.
In summary:
1. Create an ArrayCollection called "dataServiceAC"
2. Call DataService.fill(dataServiceAC);
3. Call RemoteObject.getData() and get an ArrayCollection called remoteAC.
4. Add the contents of remoteAC to dataServiceAC.
5. Call DataService.saveCache();
6. Close the application.
If you need the data again when you re-open the AIR Application simply call fill() again the same EXACT way you did before...
I have this up and working and it seems to be a good solution when you need an indication that your data in available or finished loading.
Warning!!! Caching data to SQLite through a DataService may have performance issues depending on the complexity of the data and the number of rows. I am noticing is gets slow at around 20K rows with simple data and at about 4K rows with complex data or data with a complex nested hierarchy.
BlazeDS vs. LCDS - Channel/Protocol Recommendations
I have used this information to help make recommendations to clients for different architectural configurations.
Rather than duplicate information here is the official link to this information:
http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=lcconfig_1.html
Choose the "Channel & Endpoint Recommendations" Link....
Conclusion
The NIO AMF/HTTP endpoints in LCDS 2.6 use the same client-side Channel classes as their servlet-based endpoint counterparts in BlazeDS. They just scale better than the servlet based endpoints. If the web app is not servicing general servlet requests, you can configure the servlet container to bind non-standard HTTP/S ports leaving 80 and 443 free to be used by your LCDS NIO endpoints. Because LCDS is a super-set of BlazeDS, you still have access to the servlet-based endpoints if you want to use them instead.
Reasons to use the servlet-based endpoints could be because you need to include 3rd party servlet filter processing of requests/responses or need to access data structures in the application server's HttpSession.
IMPORTANT: The NIO HTTP endpoints are not part of the servlet pipeline, so while they provide a FlexSession in the same manner that RTMP connections do, these session instances are disjoint from the J2EE HttpSession.
Security
Many people wonder how to secure an RTMP Connection. While there are many options one that I have found works well if to develop an SSO mechanism which keeps HTTP Session in Sync with RTMP Session in LCDS using Context and Session Listeners; using a java.security.Principal in a HashMap as the sync token. I have to give credit to Peter Martin for pioneering this solution. This can be complex but can serve as a way to secure your RTMP connections against the same security constraints that your HTTP Requests must adhere to.
Rather than duplicate information here is the official link to this information:
http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=lcconfig_1.html
Choose the "Channel & Endpoint Recommendations" Link....
Conclusion
The NIO AMF/HTTP endpoints in LCDS 2.6 use the same client-side Channel classes as their servlet-based endpoint counterparts in BlazeDS. They just scale better than the servlet based endpoints. If the web app is not servicing general servlet requests, you can configure the servlet container to bind non-standard HTTP/S ports leaving 80 and 443 free to be used by your LCDS NIO endpoints. Because LCDS is a super-set of BlazeDS, you still have access to the servlet-based endpoints if you want to use them instead.
Reasons to use the servlet-based endpoints could be because you need to include 3rd party servlet filter processing of requests/responses or need to access data structures in the application server's HttpSession.
IMPORTANT: The NIO HTTP endpoints are not part of the servlet pipeline, so while they provide a FlexSession in the same manner that RTMP connections do, these session instances are disjoint from the J2EE HttpSession.
Security
Many people wonder how to secure an RTMP Connection. While there are many options one that I have found works well if to develop an SSO mechanism which keeps HTTP Session in Sync with RTMP Session in LCDS using Context and Session Listeners; using a java.security.Principal in a HashMap as the sync token. I have to give credit to Peter Martin for pioneering this solution. This can be complex but can serve as a way to secure your RTMP connections against the same security constraints that your HTTP Requests must adhere to.
Wednesday, October 15, 2008
Using a DataService in AIR to automatically cache complex data in SQLite without LCDS Data Management
One of the most powerful features of a DataService in AIR is its ability to cache complex data either automatically or by calling DataService.saveCache(). The data is persisted to SQLite automatically with this call and typically the data that is cached is the data found in the ArrayCollection returned from the fill() method.
Well, what if you simply wanted to automatically save a complex hierarchy of Value Objects in an ArrayCollection but you didn't want to use LCDS Data Management and build Assemblers for your application. What if you just wanted to use BlazeDS?
Well, you can....
I figured this out because you cannot rely on any event, not even the ResultEvent, from LCDS to tell you that a fill() has finished loading data to your AIR Application...I needed a notification.
I built a solution that does exactly this....details to follow soon...
Well, what if you simply wanted to automatically save a complex hierarchy of Value Objects in an ArrayCollection but you didn't want to use LCDS Data Management and build Assemblers for your application. What if you just wanted to use BlazeDS?
Well, you can....
I figured this out because you cannot rely on any event, not even the ResultEvent, from LCDS to tell you that a fill() has finished loading data to your AIR Application...I needed a notification.
I built a solution that does exactly this....details to follow soon...
Using LCDS Data Management with Flex/AIR & Cairngorm
Last night I gave a presentation on LCDS Data Management and how to use it with Flex, AIR & Cairngorm. I wanted to post the presentation and source code so that you can learn from it. The presentation is self explanatory and the Flex Project easily integrates with the LCDS 2.6 Samples WAR. The Flex Project and Presentation cover the following subjects:
The sample application is easy to install. Simply follow these steps:
The project has good examples for calling two types of Assemblers, a Default Fill and Page Fill Assembler. It also shows how to implement a DataService “Manager” rather than a “Command – Delegate” Pattern for dealing with Data Services in Flex/AIR and also custom sorting and filtering across both Assemblers. There is also an example of using a “DataServiceTransaction” to update a destination through a Remote Object and propagate changes to each client.
Note: You will need to wait about 60 seconds before these links become active to download these files....be patient...thanks...
(If the links are broken please email me and I will send you the files directly....)
LCDS Presentation
LCDS Sample Project
Please email me with any questions and let me know if you run into other issues installing the project. I will update the post based on your feedback...
- The differences between BlazeDS & LCDS
- Channel Options for both technologies
- What is Data Management?
- How to connect Flex/AIR to LCDS
- Default fill() versus Page fill() Assemblers
- Performance considerations when writing Assemblers
- Offline capabilities and caching with AIR
- Tips & Tricks from lessons learned
The sample application is easy to install. Simply follow these steps:
- Deploy the LCDS 2.6 Samples WAR to JBOSS and make sure it works. Simply explode the WAR and place it in the “deploy” directory. (You don't have to use JBOSS)
- Open the project zip file, import the project into FlexBuilder 3 and change the build directory to a location in the Samples WAR.
- Compile the Java Classes into the WEB-INF/classes directory of the Samples WAR.
- Point the “-services” compiler directive in the Flex Project at the services-config.xml file in the “config” directory of the project. Also, either integrate the destinations in data-management-config.xml and remoting-config.xml into your WAR config Flex files located in WEB-INF/flex or copy over them. You may have to eliminate a few destinations if you copy over them.
- Compile and run…
The project has good examples for calling two types of Assemblers, a Default Fill and Page Fill Assembler. It also shows how to implement a DataService “Manager” rather than a “Command – Delegate” Pattern for dealing with Data Services in Flex/AIR and also custom sorting and filtering across both Assemblers. There is also an example of using a “DataServiceTransaction” to update a destination through a Remote Object and propagate changes to each client.
Note: You will need to wait about 60 seconds before these links become active to download these files....be patient...thanks...
(If the links are broken please email me and I will send you the files directly....)
LCDS Presentation
LCDS Sample Project
Please email me with any questions and let me know if you run into other issues installing the project. I will update the post based on your feedback...
Subscribe to:
Comments (Atom)