Tải bản đầy đủ - 0 (trang)
6 When to Use XML/XSL for Web Interfaces

6 When to Use XML/XSL for Web Interfaces

Tải bản đầy đủ - 0trang

focusedongeneratingXML,theXMLcanbeusedforotherpurposes

laterinthelifetimeoftheapplication.Forinstance,iftheapplication

neededtoworkonaPDA,adifferentsetofXSLfilescouldbeusedto

rendersmaller,moreconciseoutput.Iftheapplicationneededtobe

calledasaSOAPservice,thegeneratedXMLcouldbeusedaspartof

theSOAPenvelope.Infact,thisflexibilityisprobablythesinglebest

reasontouseXMLwithXSL.XSLhasthedistinctdrawbackthatitisa

rules-basedlanguage;thisissomethingthatmanydevelopershave

difficultyunderstandingwhencomparedtoasimpleproceduralapproach

likeJSP.Itisnotentirelyclearthatifyouareonlybuildingasingle,

HTML-basedinterface,thatthereismuchofanadvantagetousingXML

withXSL.However,whenyouareinasituationwhereyourequire

multipleapplicationinterfacesthateachvaryfromeachotherinfixed,

repeatingways,XSLtransformationisaveryattractiveoptionforyour

userinterfacedevelopment.

Thereareseveralframeworks,whichcanbeusedinconjunctionwiththe

techniquesdescribedinthischapter.Onesuchframework,Strutsfor

TransformingXMLwithXSL(stxx)isanextensionofthestrutsframework

tosupportXMLandXSLwithoutchangingthefunctionalityofstruts.Stxx

supportsStruts1.0and1.1.Youcanreadmoreaboutstxxat

http://stxx.sourceforge.net/.



15.7Summary

InthischapterwehavecoveredthebasicsofXSL,Java,andXSLTand

howtouseXSLinWSAD.XMLandXSLcanbeusedtobuildrobust

Webinterfacesthatcanbeeasilyrepurposed.



Chapter16.DevelopingandTestingthe

DomainModel

InChapter1,weintroducedtheconceptoflayersthatcanbeusedto

partitiontheoverallenterpriseapplicationarchitectureintoseparate

concernsinordertosimplifydevelopmentandmaintenance.Recallthat

thepresentationlayerprovidestheapplicationuserinterface,thedomain

layer,thebusinesssemantics,andthedatasourcelayerpersistenceand

integrationwithexistingapplications.Additionallayersmapbetweenthe

corelayers:thecontroller/mediatorlayerthatmapsthepresentationto

thedomain,andthedatamappinglayermapsthedomainlayertothe

datasources.

Inthischapter,we'lltakeacloserlookatthedomainlayertoseewhat

roleitplaysintheenterpriseapplication,howitiscreated,howitis

integratedwiththedatasourcelayer,andhowitistested.

Gettingthedomainmodelrightiscriticaltothesuccessoftheenterprise

applicationasitcapturesthesemanticsoftheproblemtobesolvedina

mannerthatgreatlyaffectstheabilitytomodifytheapplicationtomeet

changingbusinessneeds.Developingandvalidatingthedomainmodel

earlyinthedevelopmentlifecycleofanapplicationprovidesagood

foundationforallotheraspectsofdevelopment.Figure16.1showswhat

we'recoveringinthelayeredarchitectures.



Figure16.1.Layeredarchitectureroadmap.



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

6 When to Use XML/XSL for Web Interfaces

Tải bản đầy đủ ngay(0 tr)

×