11.07.2015 Views

WEB-ENABLE POWERBUILDER APPS WITH SYBASE EASERVER ...

WEB-ENABLE POWERBUILDER APPS WITH SYBASE EASERVER ...

WEB-ENABLE POWERBUILDER APPS WITH SYBASE EASERVER ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CONCURRENCYThis property indicates that the componentis thread-safe, meaning multipleinstances can run in memory simultaneously.Shared components are notthread-safe, neither are PowerBuildercomponents with instance DataStores (aDataStore has embedded operating systemfunctionality that prevents it frombeing thread-safe and surviving whenmultiple instances are running at onetime). Setting this attribute to trueimproves performance for those componentsthat are thread-safe.AUTOMATIC DEMARCATION/DEACTIVATION (CHECKEDFOR STATELESS COMPONENTS)Stateless components automaticallydeactivate after every method call. If possible,all components should be statelesssince it increases reusability and decreasesthe load on server resources. Anotherconsideration here is that stateful componentsare bound to the client until they’redeactivated, creating a potential memoryleak.SUPPORT INSTANCE POOLINGInstance pooling allows componentsto be reused without being reinstantiated,thus improving performance. From adeveloper’s perspective, instance-pooledcomponents must be initialized in theactivate event and code cleaned up inthe deactivate event.COMPONENT TIMEOUTSet this property for stateful componentsto the number of secondsbetween method calls. Setting this propertyprevents a component from beingleft orphaned in memory.During the deploy process, severalerrors can occur. Generally, these are theresult of some setting in the deploy projectitself. For example, errors about therepository not being available can occurbecause you don’t have access to themachine or, more likely, because theserver name or port number are typedincorrectly. In addition, to redeploy servicecomponents, you may need toremove the component name fromthe list of services on EAServer(com.sybase.jaguar.server.services) andshut down and restart EAServer. If thereis a permissions error, check theusername and password provided forEAServer. Also, make sure it’s actuallyrunning on the server.Testing components locally is animportant part of the overall process. Itensures that a component performs asexpected when there are no other possibleavenues of interference. Test thecomponent in the environment youexpect to deploy to production. To isolatespecific functionality, you mightcreate a window or Web page to testwith, but once the testing is complete,remember to test the component in thedesired natural environment. It’s sometimeshelpful to test components beforedeploying them to EAServer by callingthe desired method from the open eventof the application object:n_cst_objectlnv_objectlnv_object = create n_cst_objectlnv_object.event activate()lnv_object.mymethod()Once the desired outcome has beenattained, create test scripts so theexpected results are clearly documented.In this process, make sure each stepis clearly laid out and nothing is left tochance.Once you’re satisfied that the componentswork as designed, deploy them tothe test box. Here the components mustnow commingle with other, perhapsunrelated, components.Any Web pages that call the componentsshould also be deployed at thistime. (Windows clients don’t need to bedeployed since they’ll ultimately resideon the client machine.) Any relatedpieces must be documented anddeployed at this time.Using the test scripts developed earlier,test the module again. Each pageshould be thoroughly covered and everyresult clearly documented. If the modulefails any test, the failure should beisolated, resolved, and the entire moduleretested first locally, then on the testbox.At this point, the module should beready for the unexpected: user acceptancetesting. Users can find ways ofbreaking an application that a developernever considered. Given this, it’s importantthat the users have as much time ashumanly possible.In addition, it’s important to continuetesting the application once it’sactually deployed to staging. Onceeveryone is satisfied that everythingworks as intended and desired, it’spassed all the tests, it looks good, andeverything is consistent and well documented,the module can be deployed toproduction. The whole cycle can thenstart over with changes, upgrades, ornew modules.ConclusionWhen building n-tier applications,carefully consider the application flow.Decide what business logic anddata-access logic will be deployed tothe application server and which languagesthese components will be writtenin. Examine each of these applicationpieces for reusability. Eachreusable piece of the application, aswell as business rules and data accesslogic, will become an object to bedeployed to EAServer. Make sure theseobjects are broken out into the smallestpossible pieces to ensure maximumreusability.Follow the development workflowprocess to ensure that the applicationdevelopment is complete and the entireapplication is completely documented.Make sure the users are involved in theprocess from the beginning. Storyboardthe application so the flow is clear andthe developers and the users understandthe process. Create functionalspecs and the user interface, then createthe objects that will be EAServer components.Follow this six-step process to createEAServer components:1. Define the EAServer component in aserver library.2. Deploy the component to EAServer.3. Generate a proxy in the client application.4. Connect the client to EAServer.5. Initialize the proxy.6. Invoke the desired methods.When creating a component, start byinheriting from n_cst_jaguar in the server.pbllibrary. Use the component developmentchecklist to ensure nothing isleft out when developing a component.Before deploying the component toEAServer, verify the project properties toensure they are correct. Finally, test, test,and test again. ▼tpbeck@intelliserve.comAUTHOR BIOTimothy P. Beck ismanaging partner andfounder of IntelliServe LLC,a Sybase ConsultingPartner, an iAnywhereSystems Integrator, and aSybase Education Agent.He has been working withPowerBuilder since 1991,and has been a certifiedinstructor of PowerSoft(later, Sybase) technologyfor more than eight years.www.SYS-CON.COM/pbdj/PBDJ volume9 issue421

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!