Building Business Apps with Silverlight文档格式.docx
- 文档编号:17942081
- 上传时间:2022-12-12
- 格式:DOCX
- 页数:19
- 大小:222.22KB
Building Business Apps with Silverlight文档格式.docx
《Building Business Apps with Silverlight文档格式.docx》由会员分享,可在线阅读,更多相关《Building Business Apps with Silverlight文档格式.docx(19页珍藏版)》请在冰豆网上搜索。
takesmuchofthepainoutofbuildingbusinessapplicationsduetothequalityofthedesign-timeexperience.ThispaperdescribeshowtoleverageSilverlight(andtheassociatedtooling)tobuildbusinessapplications.Thepaperpresentsanoverviewoftherationale,architecturalapproaches,patterns,andtoolkitstoconsiderwhenbuildingbusinessapplicationswithSilverlight.
Contents
Introduction3
WhatIsaBusinessApplication?
3
WhyConsiderSilverlightforBuildingBusinessApplications?
4
ArchitecturalConsiderations5
HTML/ASP.NET/PHPApplicationArchitecture5
RichInternetApplicationArchitecture6
WCFRIAServices6
DisplayingDataontheClient8
HandlingLargeAmountsofData9
CapturingDataontheClient9
ValidatingUserInput10
ValidationAttributes10
SharedCustomValidationLogic10
MicrosoftExtensibilityFramework(MEF)11
SecurityConsiderations12
RoleChecking12
AccessingLocalResources14
Printing15
Patterns16
Model-View-ViewModel16
DependencyInjection17
PRISM(CompositeApplicationGuidanceforWPFandSilverlight)18
Conclusion20
AdditionalResources20
SilverlightResources20
RIAServicesResources20
PRISMResources20
MEFResources20
PrintingResources20
LegalNotice21
Introduction
Silverlighthasrapidlyevolvedsinceitsoriginalreleasein2007.TheinitialemphasisforSilverlightwasonprovidingrichmediaexperiences,enablingdesignersanddeveloperstoaddrichdegreesofinteractivity,mediaandanimationtotheirWebsites.Silverlight3extendedthecapabilitiesoftheplatform,addingmanynewfeaturesessentialforbusinessapplicationdevelopment.TherichtoolsupportprovidedbyVisualStudioandExpressionBlendalsohelpsyoutospeedupyourbusinessapplicationdevelopmentandlowerthecostofdevelopment.Silverlight4,thecurrentversion,addsevenmorefeaturesmakingSilverlightacompellingchoiceoftechnologyforbuildingbusinessapplications.
Sowhatdowemeanbytheterm“businessapplication”?
Abusinessapplicationhasadistinctpurposeorgoal,andgenerallyhelpsacompanytosavemoneyortime,orperhapshelpsthemtoimprovecustomersatisfaction.CommonexamplesmightincludeCRMapplications,time-trackingandexpenseclaimapplications,e-commerceande-tailexperiences,purchaserequestapplications,andHRemployeemanagementsystems.Thisstyleofapplicationhasanumberofcommoncharacteristics.
Businessapplications:
∙Aredata-driven.Dataisall-important,andtheapplicationneedstobeabletoquery,shape,anddisplaydataindifferentways.Theapplicationalsoneedstobeabletotakeinputfromtheuserviaformfields,validateit,andthensaveandupdateitappropriately.
∙Requirerobustdatavalidation.Toensurethebestuserexperience,validationofinputdataneedstooccurontheclientwithimmediatefeedbackfortheuser.Foraddedsecurity,thevalidationmustalsobeprovidedontheserver.
∙Needtobesecure.Thedatadisplayedbytheapplicationtypicallyneedstovarydependingonwhoisaccessingtheapplication.Authentication(inotherwords,knowingwhoisaccessingtheapplication)isessential.Also,thefunctionalityofferedbytheapplicationoftenneedstovarydependingontheuser’srole.
∙Mustpresentaprofessional,efficient,andenjoyableuserexperience.Aprofessionalinterfacethatmatchescorporatebrandingrequirementsandenablesuserstogettheirjobsdoneefficientlyandeffectivelyisgenerallymoreimportantthanfancyvisualeffects.Abusinessapplicationalsoneedstovisualizedatainmanydifferentwaysusingavarietyofdifferentcontroltypes,rangingfromsimpletextboxes,comboboxes,anddatagridstomoresophisticatedcontrolsprovidingchartsandreports.
∙Oftenneedaccesstolocalresources.Manybusinessapplicationsalsoneedaccesstolocalresourcesincludingthelocalfilesystem,otherclient-sidebusinessproductivityapplicationssuchasMicrosoftOfficeExcel®
orMicrosoftOfficeOutlook®
printers,microphones,webcams,theclipboard,andsoon.
∙Dependonintegrationwithexternalandinternalservices.Manybusinessapplicationsneedtoaccessexistingservicesandapplicationstoprovidecriticaldataessentialfortheoperationofthebusinessapplication.ThesemaybeaccessedlocallyovertheinternalnetworkorremotelyovertheInternet.AccessistypicallyviaRESTorSOAPcalls.
Usersofbusinessapplicationsexpectrich,functional,andwell-performinginterfacessuchasthosetypicallyprovidedbythedesktopapplicationstheyareusedto.Withthelatestbusinessapplication-focusedenhancementstoSilverlight,therichcapabilitiesofitsuserinterface,andtheassociatedtoolingprovidedbyVisualStudioandExpressionStudio,youcannowrapidlybuildthistypeofapplicationandenjoythebenefitsofWebdeliveryanddeployment.
ThefollowingfeaturesinparticularmakeSilverlightaviableandcompellingtechnologyforbuildingbusinessapplications:
∙WCFRIAServices.WCFRichInternetApplication(RIA)ServicesandVisualStudio2010provideanelegantsolutionforhandlingthetransmissionofdataacrossthetiersofyourapplication,datavalidation,andchangetracking.Indoingso,theyprovideaunifiedmodelforclient-sideandserver-sidedevelopment,makingatraditionallydifficultjobforthedevelopermucheasier.
∙Richdatacontrols.Silverlightprovidesarichlibraryofoversixtycontrolscomplimentedbyopensourceandvendorcontrolpacks.Thenew,functionality-richdataboundcontrolssuchastheDataGrid,ContentControl,DatePicker,andchartingcontrolsprovidedbytheSilverlightToolkitmakeitmucheasiertodisplaydatainanattractivemanner.NewcontrolssuchastheRichTextAreacontrolmakeitmucheasiertocaptureformattedtextinput.WorkingwithlargequantitiesofdataandhandlingdatapagingisalsomucheasierwiththeDataPagercontrol,whichlargelyautomatesthisjob.
∙Pagenavigation.Silverlightprovidesapagenavigationframework,makingitmucheasiertosupportnavigationbetweenpages.Youcancontrolhowandwhenpagenavigationshouldinteractwiththebrowserhistoryjournal,anditalsoprovidesURImapping,enablingyoutousemeaningfulURIstonavigatebetweenthedifferentpagesinyourapplication.
∙Out-of-browsersupport.Theout-of-browserfeatureenablesyouruserstocontinueworkingwhiledisconnectedfromthenetwork.Forexample,youcouldwriteanapplicationthatsynchronizestheirchangesbacktotheserverthenexttimetheyconnect.Out-of-browserapplicationscanalsorunastrustedapplicationswithmoreprivileges,makingtasksrequiringlocalresourceaccesspossible.Forexample,youcanaccessthelocalfilesystem,interactwithOfficeapplications,orhavefullkeyboardaccessinfull-screenmode.
∙Sharedcodevalidation.Thevalidationfeaturesupportmeansyoucanwriteyourvalidationlogiconce,andhavethecodeautomaticallyreusedintheclientandontheserver.Youcanalsodeclarativelyapplybasicvalidationsupport,suchaslengthandrangechecks.
∙Localresourceaccess.Silverlightenablesout-of-browserSilverlightapplicationstoaccesslocalresources,suchasthefilesystemandclipboard,aswellasotherlocalapplicationsanddevicesthatprovideaCOMinterface.UsingtheCOMsupportenablesyourSilverlightbusinessapplicationstointegratewithOfficeapplicationssuchasExcelorOutlookandperformmanyothertaskspreviouslynotpossiblefromWebapplications.
∙Printingsupport.Silverlightprintingsupportenablesyoutoprintwholepagesandspecificdataitemsdirectlyfromyourbusinessapplications.
∙Commandsupport.SilverlightnowprovidessupportforcommandsinthesamewaythatWPFdoesfordesktopapplications.Commandsprovideawaytodata-bindspecificoperationsinyourapplicationtocontrolsinyourapplication’suserinterface.ThiscommandapproachsupportspatternslikeModel-View-ViewModel(MVVM)thatpromotecodeseparation,maintainability,andtestability.
∙Draganddrop.Silverlightapplicationscannowexposedroptargets,enablinguserstodragfilestoyourSilverlightapplications.Forexample,ausercoulddraganddropanExceldocumentontoaSilverlightapplicationandhavetheapplicationautomaticallydisplayitsdatainaDataGridcontrol.
∙Right-clicksupport.Youcannowcreateyourownright-clickpop-upmenustofurtherenhancetheuserexperienceandprovideeasyaccesstocontext-specificfeaturesandfunctions.
So,whilemanyfeaturesessentialforbusinessapplicationsarenowavailable,howshouldyoustructureyourSilverlightapplicationtobesttakeadvantageofthem?
Howshouldyouperformdataaccess?
HowshouldyoupassdataoverthenetworkbetweenyourrichUIanddatabase?
Establishingandunderstandingtherightarchitectureupfrontisessential.
ArchitecturalConsiderations
SilverlightapplicationarchitecturesharesmuchincommonwithtraditionalHTML/ASP.NET/PHPapplications,withoneimportantdifference.WhenyouuseSilverlight,thepresentationlogicislocatedsolelyontheclientinyouruser’sbrowser.
HTML/ASP.NET/PHPApplicationArchitecture
ConsiderthearchitectureofatypicalHTML-basedWeb-basedapplicationsuchasoneyoumightcreateusingASP.NET.ThisisshowninFigure1.
Figure1:
H
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Building Business Apps with Silverlight
![提示](https://static.bdocx.com/images/bang_tan.gif)