ASP编程:Protecting Your DHTML Using ASP
缺点:正版成本价格贵(盗版就不说了)、不够安全,大多数服务器用windows系统,没有linux安全dhtmlProtectingYourDHTMLUsingASPbyJean-LucDavid
CATEGORIES:SiteDesign,Scripting
ARTICLETYPE:TutorialReaderComments
ABSTRACT
ArticleRating
Useful
Innovative
Informative
100responses
DynamicHTMLallowsdevelopersanopportunitytocreatepowerfulclientwebapplicationsthatarecross-browsercompliant,interactiveandportable.Unfortunately,whenyoupublishtothewebyourJavaScriptcodeisinsecure.Yourhardworkcanbeviewed,downloadedandcopied.ThisarticlewilldescribeanexperimentalinnovativemethodofsecuringyourDHTMLcodeusingserverauthenticationand"datastreams".Themethodinquestionwillpreventtheenduserfromdirectlyaccessingthesourcecode.
ArticleDiscussionRatethisarticleRelatedLinksIndexEntries
ARTICLE
Abstract:
DynamicHTMLallowsdevelopersanopportunitytocreatepowerfulclientwebapplicationsthatarecross-browsercompliant,interactiveandportable.Unfortunately,whenyoupublishtothewebyourJavaScriptcodeisinsecure.Yourhardworkcanbeviewed,downloadedandcopied.Ifyouaredevelopinge-commerceapplications,yourbusinessrulesandpracticesmaybeexposedtopryingeyes.
TraditionalmeansofprotectingJavaScriptusuallyinvolvescramblingorobfuscatingthecode.Thesemethodsarehighlyineffectualagainstanydeterminedcode-hacker.
ThisarticlewilldescribeanexperimentalinnovativemethodofsecuringyourDHTMLcodeusingserverauthenticationand"datastreams".Themethodinquestionwillpreventtheenduserfromdirectlyaccessingthesourcecode.
Introduction:
DHTMLisfastbecomingthedefactotoolforcreatingpowerful,cross-browserapplicationsontheweb.MicrosofthasralliedbehindthedevelopmentoftheDOM(DocumentObjectModel)andNetscapehaspushedforwardwithitssupportforthelanguagewiththereleaseoftheNetscape6browser.ThepowerofDHTMLisbasedinpartbyitsabilitytoprogrammaticallycontrolanyfourthgenerationbrowserwithouttheneedforadditionalpluginsorexecutables.
Asweallknow,thewebisfundamentallyaninsecuremedium.Allclientbaseddevelopmentcode(HTML,JavaScriptSourceFilesandStyleSheets)typicallydownloadsintotheuserscachewhentheyaccessyourwebapplicationsorwebpages.Theendusercansimplyclickon"ViewSource"toview,analyzeorcopyyourcode.Thisisabasiclimitationthatwehaveallhavetolivewith.Ordowe?
Istronglyfeelthatwebdevelopersshouldbegiventhechoicewhetherornottosharetheirclientbasedcode.Asyourwebapplicationsbecomemorepowerfulandversatile,sodoestheneedtoprotectyourintellectualproperty.EspeciallyifyourapplicationisbusinessorientedoryouvespentmonthsworkingonauniqueorgroundbreakingDHTMLapplication.
Traditionalprotectiontechniques:
MSDNhaspublishedanexcerptofWroxsInstantJavaScriptbookontheirsitethatoutlinesafewoptionsforprotectingyourJavaScript.
http://msdn.microsoft.com/library/partbook/instantj/privacyforscriptwriters.htm
TheprincipalclientJavaScriptcodeprotectionschemescanbedividedintothefollowingcategories:
a)TheMicrosoftApproach:MicrosofthastackledthechallengeofprotectingclientsourcecodewiththereleaseoftheMicrosoftWindowsScriptEngineVersion5.0.Thesourcecodeisencoded(notencrypted)andfilteredthroughanActiveXlayer.
http://msdn.microsoft.com/library/periodic/period99/scriptengine.htm
ThedisadvantageofthisapproachisthattheencodingcanonlybedecipheredwithMicrosoftsInternetExplorer5.0+.Theyreadilyadmitthattheencodingprocessisnotentirelyfoolproof.Ifyouareusinganyotherbrowser(includingearlierreleasesofInternetExplorer),youwillnotbeabletoaccessthescriptthroughthebrowser.
b)CodeObfuscation:S</p>对用户来说可预见费用、节约费用,可以做到花少钱办大事。由于省去了购买软件和硬件等的前期费用,用户可以租用较高级的应用软件。ASP的收费是根据软件的类型、客制化程度、用户数量、服务期限来定的,对客户来说这笔费用是可以预见的。方便于客户应用软件的升级。 代码逻辑混乱,难于管理:由于ASP是脚本语言混合html编程,所以你很难看清代码的逻辑关系,并且随着程序的复杂性增加,使得代码的管理十分困难,甚至超出一个程序员所能达到的管理能力,从而造成出错或这样那样的问题。 我可以结合自己的经验大致给你说一说,希望对你有所帮助,少走些弯路。 运用经典的例子。并且自己可以用他来实现一些简单的系统。如果可以对他进行进一步的修改,找出你觉得可以提高性能的地方,加上自己的设计,那就更上一个层次了,也就会真正地感到有所收获。 以上是语言本身的弱点,在功能方面ASP同样存在问题,第一是功能太弱,一些底层操作只能通过组件来完成,在这点上是远远比不上PHP/JSP,其次就是缺乏完善的纠错/调试功能,这点上ASP/PHP/JSP差不多。 还有如何才能在最短的时间内学完?我每天可以有效学习2小时,双休日4小时。 Session:这个存储跟客户端会话过程的数据,默认20分钟失效 兴趣爱好,那么你无须学编程,申请一个域名和空间,在网上下载一些免费开源的CMS系统,你不用改代码,只须熟悉它们的后台操作,像office一样简单方便,很快就能建一个站点,很多站长都是这样做的 ASP.Net和ASP的最大区别在于编程思维的转换,而不仅仅在于功能的增强。ASP使用VBS/JS这样的脚本语言混合html来编程,而那些脚本语言属于弱类型、面向结构的编程语言,而非面向对象,这就明显产生以下几个问题: 兴趣爱好,那么你无须学编程,申请一个域名和空间,在网上下载一些免费开源的CMS系统,你不用改代码,只须熟悉它们的后台操作,像office一样简单方便,很快就能建一个站点,很多站长都是这样做的
页:
[1]