Showing posts with label weborb deployment. Show all posts
Showing posts with label weborb deployment. Show all posts

Thursday, May 7, 2009

Beginnings of an RIA ECommerce solution

Another round of tests and some interesting results. I have successfully stubbed the mySQL database into Flex via .Net procedures created by WebORB. Also, I have added fields to the mySQL tables of interest without any unique key violations in the Miva CMS. I had to add primary keys to several tables in the database, but as stated, no adverse affects, meaning the db queries in miva's cms are fairly fast and loose. In this case that is a good thing.

Still working on the details, but so far it seems possible to do the following:
  • Use Miva Merchant 5.5 as a backend solution for a rich ecommerce (web) application
  • Use Flex 3 as a client frontend with RPC enabled products arriving from Miva
  • Add custom fields as needed to elaborate on the data the Miva CMS typically allows
That's a good start. The test verifies an architecture consisting of Miva -> MySQL -> .NET -> Flex on the incoming side.

Now I'm looking into solutions for the Flex -> Google Checkout -> Miva on the shopping cart transaction side. For now, going to checkout will out of necessity pop out of the RIA window and open another. It's a small price to pay, especially considering there are virtually no single-state checkouts anywhere on the web. It hasn't hit the production line yet.

Since Miva is stable with additional fields in its DB but cannot administer the extra fields, my wishlist of useful add-ons now includes a secure Flex-based CRUD-enabled CMS to manage the custom fields added to Miva DB tables. It would be great to be able to post images and data through a form in Flex, and very possible time-permitting. For now, the method is direct DB data injection and FTP posting. Not good for a client admin, but fine for a developer at this point.

And the point is, it works!

Wednesday, May 6, 2009

MIVA MERCHANT

Working on a Flex ecommerce solution. Need to provide the client with a full suite of merchant tools including:
  • Pre-provided tax rate data on orders within the US
  • Price and quantity inventory info
  • Fulfillment and basic CRM features
  • Analytics
  • Easy-to-use content management
  • API to Google Checkout
  • Portable to external spreadsheets and financial software
  • Secure credit card transactions (natch)
Plenty of solutions offer the above. The catch is, in order to provide my own client side in Flex I require a direct db connection, preferably to SQL, to supply a stream of remote data to my shopping UI. I have created my own CMS that will do the job, but there are ornery caveats associated with an architecture including 2 repositories of data, my CMS and the ecommerce CMS, namely:
  • consistency of state across tiers
  • concurrency
  • locking
  • transactions
  • rollback
Dual databases for one application is seldom if ever ideal, and certainly not in this case. Trouble is, unless there is some way to communicate between Flex and the Ecommerce solution, 2 databases are the only way to roll it out. But what form would this communication take? In the case of Flex, there are three services available for accessing data:
  • HTTPService: Passes textual data over HTTP. This is often used to fetch RSS feeds, read XML generated by a server, or simply pass text-based data from server to client.
  • WebService: Allows a Flex application to invoke server-side web services using SOAP and handle the results of web service calls. These web services may reside on the server that has served the rich Internet application or may call third-party web services through a proxy on the server.
  • RemoteObject: Allows a Flex application to directly invoke methods on Java classes residing on the application server that has served the RIA. Data is transferred in binary format (Adobe Action Message Format or AMF) over HTTP or HTTPS, with the server translating Java and ActionScript objects as they pass over the wire.
That's a pretty rich options list. I can use RSS feeds, XML, Web services or even direct DB access via RemoteObject. Lots of options, yes, options galore. As for the custom CMS I mentioned, it is .NET and uses RemoteObject to pull from the SQL database. Now I seek a similar means of pulling data from the ecommerce system. Any will do. But as it appears, there are few options.

I have thorougly scoured practical ecommerce, a website devoted to ecommerce application vendors. Practical ecommerce website has a Cart of the Week feature in which they interview principals of a web ecommerce provider each week, weighing the pros and cons of their service. There are open source solutions, Microsoft solutions, Adobe solutions, many variants. They can be hosted or licensed options. I've read through many of them.

In addition, I have signed up for Miva Merchant 5.5 with the reseller that hosts my client site. They are one of the 800 pound gorillas of ecommerce, Google Checkout being the reigning heavyweight, but not a full service solution as Miva offers.

Miva Merchant offers database integration now, as of 5.5, via the services of MIVA SQL and optional MySQL support, but here's the rub. Try a google search for "miva sql" and venture a guess at the richness of answers google will provide. At my last search...462 pages. A pathetic level of information out there to say the least, and equally untenable are the docs offered by Miva. Here are a few plaintive queries that died on the vine on my hosting account forums:
I've put in a support request ticket and will continue to pursue the issue. For my stake in this, at the root of the matter lies a question of Flex and Ecommerce integration. I ask the ecommerce vendor community collectively, is there a solution that offers a full set of features as well as database access? Has any of the companies seen the value in offering a solution that can serve as a data feed and cms, or conversely are they all template-and-markup-based solutions? I'll post more once I have some concrete answers to this.

Wednesday, April 29, 2009

Bug in Weborb 3.6 for .NET prevents WDMF from generating server code

Here's an issue that could cost you lots of troubleshooting time to fix. While weborb is a stellar product IMO it is lacking in thorough support docs. Probably that is fine since a commercial client can purchase phone support, but I digress. The problem aka bug aka omission I refer to in weborb 3.6.0.3 results in:

Code Generation Failed

This is the result of an attempt to generate the all-important client-server serialization classes that weborb builds. The client classes are downloaded from the weborbconsole while the server classes are written to the bin directory assuming your permissions are properly set to allow this.

Permissions are easily set via Windows IIS or your webhost control panel. Permissions are also easily reviewed from your website of interest thanks to the diagnostics.aspx page provided. Potential issues are even coded red. Easy enough.

Problem is essentially the result of a wishlist item added to Weborb 3.6 and released 12/02/08, Visual Studio templates. I didn't even expect to find them, but did so and began enjoying the ease of deployment templates offer. Only problem is, they won't work unless you add the XSLT files in the ODBC directory from the original full vers of weborb30.

I tried other stuff for a while to fix the prob, then finally read the error text logs on my deployment and discovered the omission. As stated before, Weborb is the Barry Bonds of remoting, a real slugger for joining up RIAs for web and I can't say this enough. The fact that I could rely on the framework tools to hunt down the error and fix it is one reason why. Now, has anyone else had this problem? If so, I hope this helped.

Fig 1. Diagnostics aspx page for weborb









Fig 2. Creating a weborb-enabled website in Visual Studio 2008 using the weborb-provided template











Fig 3. The missing odbc folder, where it should be









Fig 4. What you should see if all goes well in the weborbconsole WDMF

Wednesday, April 8, 2009

SQL & LINQ for n-tier applications

As I've blogged a lot lately, WebORB bridges back end and presentation servers for AMF and DB CRUD functionality. Furthermore, once WebORB is configured properly, it deploys server and client code in an automated fashion, allowing this to happen. If you manage to rig it properly, it binds your data via method calls to the DB.

In developing an n-tier application, it's crucial to plan in advance how the tiers will provide for one another in the overall application chain. Justin J. Moses' blog of March 19th outlines the strength of utilizing SQL with LINQ in such a way. I especially enjoyed his definitions of generalized data transfer strategies as being either safety, hungry, greedy, or thrifty. Well done!

Since his description is more than adequate I won't go into it here, but seeing as it's a likely fit for my current project, I may post some notes later on data across the pipe with RIA.

Friday, April 3, 2009

WebORB Synopsis Pt. 1


WebORB by themidnightcoders, aka Dallas-based Mark Pillar and company, is a software application designed to facilitate and ease RIA remoting. Over its livespan, WebORB has grown to its current ambitious version (3.6) to become a sophisticated multi-tool of sorts, providing a broad range of services for a pastiche of server types.

How does a product such as WebORB come to be? Weborb is in fact one among a stable of solutions (amfphp, swx, BlazeDS, RubyAMF, LiveCylceDS et al) initiated to bridge the expanse between server side and client side in rich applications. The options in this lineup range from Open source and free to commercial and costly, from single protocol to advanced suite. WebORB among them could be said to toss the biggest lasso.

WebORB marries server technologies .NET, PHP, Rails and Java to presentation server clients Flex, Flash, AJAX and Silverlight. It allows the server side to do what it does best - provide a data bank and administration, while allowing the client to benefit from a live data source. There's a lot more on offer than simple connectivity, however.

WebORB can be deployed in modular fashion to an existing web application. Once integrated, it includes a proprietary console GUI to demo its many capabilities. As is explained in the console, WebORB offers three broad categories of connection services:
  1. Remoting (AMF3)
  2. Data Management (WDMF)
  3. Real-time Messaging
Among these, it is fitting to begin with remoting, as remoting was the initial goal of applications like WebORB. In its maturity as a service, invocation of remoting is bidirectional, fully interoperable, reflexive and essentially transparent. In addition to basic transfer of assets, WebORB remoting includes class mapping, secure channels of invocation, tree control with remote data, server-side exception handling, logins and security, and supports ARP, an open source framework for Flash and Flex initially authored by Aral Balkan.

WebORB effectively encapsulates the full capabilities of Flex Remoting, and in so doing, it lays bare the limitations of Remoting. Namely, that shuttling large serialized datatypes between environments is crude. It results in a loss of organizational nuance, such as hierarchies, relationships, dependencies. Put another way, the schema is not transferred with the data, and thus the sorting abilities that are the inherent value of a data system are lost. Data Management can be viewed as a means of addressing this limitation.

Data Management, aka WebORB Data Management for Flex or WDMF, is a means of preserving the relationships surrounding remote data between server and client sides. In a nutshell, WebORB imports table relationships directly from the server database and utilizes its own innovative analytical methods to create all the necessary interoperability through scripts it generates for both sides. In this way, WebORB enables explicit relationships to exist through a generative act of surrogation. In short, it analyzes, it marries, it step back into the shadows. Not bad, Midnightcoders, not bad. An invaluable utility and a tremendous time saver, Data Management also includes full CRUD, enabling the rich client to act as CMS if desired.

Real-time Messaging is another facet of WebORB to be explored later. Feel free to visit themidnightcoders site to learn more.

Adios for now.

Thursday, March 26, 2009

Deploying WebORB for .NET

To deploy WebORB into an existing ASP.NET application, follow the steps below:

1. Copy the following files/folders from the default Weborb installation directory to the corresponding folders in the target virtual directory:

/weborb.config
/bin/weborb.dll
/bin/MySql.Data.dll
/bin/Mono.Security.dll
/bin/Npgsql.dll
/diagnostics.aspx
/WEB-INF
/weborb.js (required only for the AJAX clients)

2. Add the following XML configuration to web.config in the target virtual directory:

<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="weborb.aspx" type="Weborb.ORBHttpHandler"/>
<add verb="*" path="codegen.aspx" type= "Weborb.Management.CodeGen.CodegeneratorHttpHandler"/>
</httpHandlers>
</system.web>
</configuration>
(Thanks to formatmysourcecode.blogspot.com for code formatting)


3. (Optional) To deploy console, example and code generator, copy the following folders with all files and subdirectories:

/weborbconsole.html
/console
/examples
/weborbassets
/all mdb files from the root

4. (Optional) Create /logs folder as the place where WebORB stores its log files

5. Grant Write permission to the user account ASP.NET uses for the following files and directories:

/weborb.config (required only if making configuration changes from the console)
/logs (required only if logging is enabled)
/weborbassets/codegen (required only if codegen is used in the console)
/weborbassets/uploads
/*.mdb (required only if writing data back on the server in some examples)

Additional steps may be required to configure logging and code generation features when deploying WebORB into another application. Generally the user account used by ASP.NET needs to have Write permission to the following files and folders:

/weborb.config
/logs
/weborbassets/codegen

Please direct any questions or comments to http://groups.yahoo.com/group/flashorb/.

Original document.