Diplomov´A Pr´Ace

Diplomov´A Pr´Ace

Cesk· e¶ vysoke¶ ucen· ¶³ technicke¶ v Praze Fakulta elektrotechnicka¶ DIPLOMOVA¶ PRACE¶ Rozhran¶³n¶astroje pro tvorbu rozvrhu Praha, 2009 Autor: Ond·rejKunc Prohl¶a·sen¶³ Prohla·suji,·zejsem svou diplomovou pr¶acivypracoval samostatn·ea pou·ziljsem pouze podklady (literaturu, projekty, SW atd.) uveden¶ev p·rilo·zen¶emseznamu. V Praze dne podpis i Pod·ekov¶an¶³ D·ekujisv¶erodin·eza podporu vynakl¶adanoupa celou dobu m¶ehostudia. P·redev·s¶³m v·sak,d·ekujivedouc¶³mu pr¶acepanu Ing. Liboru Waszniowskimu, Ph.D. za odborn¶eveden¶³diplomov¶epr¶ace,vst·r¶³cnostp·rizodpov¶³d¶an¶³dotazºu. ii Abstrakt Ukolem¶ pr¶aceje na pilotn¶³mprojektu ov·e·ritpou·zitelnosttechnologie Silverlight pro tvorbu gra¯ck¶ehou·zivatelsk¶ehorozhran¶³(GUI) optimaliza·cnihon¶astroje. Jako pilotn¶³ apliakace bylo zvoleno GUI n¶astroje pro tvorbu rozvrhu fakulty, kter¶ev sob·ekombinuje po·zadavky na komfortni ovladani bl¶³zke desktopov¶eaplikaci a z¶arove·npot·rebusd¶³len¶³ dat, kterou naopak nabiz¶³webov¶aaplikace. Uvodn¶³kapitoly¶ popisuj¶³z¶akladn¶³pojmy .NETu vyu·z¶³van¶ev Silverlight technologii, stejn·ejako s instalaci a pou·z¶³v¶an¶³Silverlightu. D¶aleje popisov¶anvyvinut¶ySilverlight program, ur·cen¶ypro tvorbu rozvrhu ·skoly. V z¶av·erujsou zhodnoceny osobn¶³zku·senosti a post·rehy nabyt¶ep·ritvorb·eprogramu. iii Abstract The aim of this thesis is to get familiar with new Microsoft technology called Silverlight and create an optimalization tool with it. As a starting application was selected GUI for declaring school's timetable, which combines requires for user friendly interface similar to desktop application and at the same time need of sharing data, which o®ers web application. Opening chapters are describing basic .NET conceptions being used in Silverlight technology as well as installation and using Silverlight. Further is described program developed in Silverlight. Personal experience found out during thesis construction are estimated at the end. iv Obsah Seznam obr¶azkºu ix Seznam tabulek xi 1 Uvod¶ 1 2 RIA 2 2.1 Prost·redkyRIA ................................ 3 2.1.1 Technologie bez pot·reby plug-inu .................. 3 2.1.1.1 AJAX(Asynchronous JavaScript and XML) ....... 3 2.1.2 Technologie s pot·rebou plug-inu ................... 4 2.1.2.1 Silverlight .......................... 4 2.1.2.2 Adobe Flex ......................... 5 2.1.2.3 Java, JavaFX ........................ 6 2.1.2.4 a ti druz¶³... ......................... 6 2.2 Silverlight vs. Adobe Flash .......................... 7 3 Silverlight 8 3.1 Historie .................................... 9 3.2 Instalace .................................... 9 3.3 Architektura .................................. 10 3.3.1 CLR(Common Language Runtime) ................. 13 3.4 WPF(Windows Presentation Foundation) .................. 15 3.4.1 XAML(Extensible Application Markup Language) ......... 16 3.5 WCF(Windows Communication Foundation) ................ 17 3.5.1 Web Services(Webov¶eslu·zby) .................... 18 3.6 LINQ(Language Integrated Query) ..................... 21 3.7 Struktura Silverlightu ............................. 22 vi 4 Vytvo·ren¶³RIA aplikace 25 4.1 Tvorba Silverlight aplikace .......................... 25 4.2 Nastaven¶³komunikace s datab¶az¶³ ...................... 27 4.2.1 Web.con¯g ............................... 29 4.2.2 P·ripojen¶³webov¶eslu·zby ....................... 30 4.2.3 Cross-Domain access policy ..................... 33 4.3 P·rid¶an¶³Silverlight aplikace na ASP.NET str¶anku ............. 36 4.4 Vol¶an¶³slu·zby v k¶odu ............................. 37 4.5 Pr¶aces daty .................................. 38 5 Popis programu pro tvorbu rozvrhu 39 5.1 Stru·cn¶ypopis ................................. 39 5.1.1 Datab¶aze ............................... 40 5.2 Tvorba GUI .................................. 42 5.2.1 Administrace rol¶³ ........................... 43 5.2.2 Navigace v Silverlightu ........................ 46 5.3 Vlastn¶³aplikace ................................ 47 5.3.1 Editace dat .............................. 47 5.3.2 Rozvrh m¶³stnosti ........................... 50 5.3.3 Typ p·redm·etu ............................. 51 5.3.4 Rozvrh u·citele ............................. 52 5.3.5 Tvorba oborºu ............................. 54 5.3.6 Nastaven¶³p·r¶³stupu .......................... 55 6 Post·rehy a probl¶emy zaznamenan¶ep·ritvorb·eprogramu 56 6.1 Pot¶³·zep·rip·r¶³stupuk webov¶eslu·zb·e ..................... 56 6.2 P·ripojov¶an¶³reference na slu·zbu ....................... 57 6.3 Probl¶emy s ASP.NET con¯gur¶atorem .................... 59 6.4 Odchyt¶av¶an¶³ud¶alost¶³my·si .......................... 59 6.5 Silverlight con¯guration ........................... 60 7 Z¶av·er 61 Literatura 63 A Seznam pou·zit¶ehosoftwaru I vii B Obsah p·rilo·zen¶ehoCD II viii Seznam obr¶azkºu 2.1 Porovn¶an¶³AJAXu a klasick¶ehointernetov¶ehomodelu (p·revzatoz [3]) .. 4 3.1 Banner nep·r¶³m¶einstalace Silverlightu .................... 9 3.2 Silverlight platforma(p·revzatoz [7]) ..................... 11 3.3 P·reklad.NET k¶odu .............................. 14 3.4 Oblasti ·cinnostiCLR ............................. 14 3.5 Uk¶azka WPF desktopov¶eaplikace ...................... 16 3.6 Uk¶azka XAML k¶odu ............................. 17 3.7 Sch¶emakomunikace WebService ....................... 20 3.8 Obsah souboru XAP odpov¶³daj¶³c¶³aplikaci s n¶azvem DiplomaThesis ... 23 4.1 V¶yb·er·sablony pro tvorbu Silverlight aplikace ................ 26 4.2 Dialogov¶eokno pro v¶yb·erdruhu Silverlight aplikace ............ 27 4.3 Tvorba t·r¶³dyLinq to Sql ........................... 28 4.4 P·rid¶av¶an¶³prvkºudo Linq t·r¶³dy ........................ 28 4.5 Soubor s k¶odemslu·zby ............................ 31 4.6 Dialogov¶eokno p·ripojen¶³reference na slu·zbu ................ 32 4.7 Obsah ServiceReferences.ClientCon¯g souboru ............... 33 4.8 Prºub·ehz¶³sk¶av¶an¶³p·r¶³stupov¶ych informac¶³(p·revzatoz [13]) ........ 35 4.9 Solution explorer Silverlight aplikace .................... 36 4.10 Vol¶an¶³slu·zby v k¶odu ............................. 37 5.1 Blokov¶esch¶emaaplikace ........................... 40 5.2 ER model datab¶aze .............................. 41 5.3 Vzhled GUI .................................. 42 5.4 ASP.NET n¶astroj pro spr¶avuwebu ..................... 43 5.5 Pou·zit¶³IsolatedStorage ............................ 46 5.6 Uvodn¶³str¶anka aplikace pro tvorbu rozvrhu ................ 48 ix 5.7 Hlavn¶³menu aplikace ............................. 48 5.8 Funkce odkazu View ............................. 49 5.9 P·rid¶av¶an¶³nov¶ych z¶aznamºu .......................... 49 5.10 P·ri·razen¶³p·redm·etºum¶³stnostem ....................... 50 5.11 Ur·cen¶³druhu p·redm·etu ............................ 51 5.12 Vytvo·ren¶³cvi·cen¶³ ............................... 52 5.13 Tvorba rozvrhu u·citele ............................ 53 5.14 Tvorba oborºu ................................. 54 5.15 N¶astroj pro administraci p·r¶³stupuk funkc¶³maplikace ........... 55 6.1 Chyba p·rip·r¶³srupuk webov¶eslu·zb·e ..................... 57 6.2 Chyba p·rip·ripojov¶an¶³reference na webovou slu·zbu ............ 57 6.3 Chyba p·rip·ripojov¶an¶³slu·zby ........................ 58 6.4 Chyba p·rip·ripojov¶an¶³reference na webovou slu·zbu ............ 58 6.5 ASP.NET Con¯guration chyba ........................ 59 6.6 N¶astroj pro spr¶avuSL aplikace ....................... 60 x Seznam tabulek 3.1 Popis hlavn¶³ch ·c¶ast¶³Silverlight platformy .................. 11 3.2 Core presentation features Silverlight platformy .............. 12 3.3 .NET Framework pro Silverlight ...................... 12 3.4 P·ridan¶eSilverlight Programming Features ................. 13 xi Kapitola 1 Uvod¶ Web je nejpopul¶arn·ej·s¶³prost·red¶³pro sd¶³len¶ysoftware. Jsou v·sakv·eci,kter¶ewebov¶e aplikace d·elatnedok¶a·z¶³, nebo jenom omezen·e.Ani p·ressnahu vybavit sv¶e,nap·r¶³klad ASP.NET webov¶estr¶ankynejnov·ej·s¶³miv·ecmiJavaScriptu, nebudeme schopni dos¶ahnout funkcionality desktopov¶ych aplikac¶³.I p·resto,·zeJavaScript poskytuje mo·znostodpov¶³dat na n·ekter¶eklientsk¶eud¶alosti,budov¶an¶³slo·zit¶ych rozhran¶³,aspo·ntak u·zivatelsky vst·r¶³cn¶ych jako stadnartn¶³aplikace desktopov¶e,je nemo·zn¶e.Hranice webu jsou neust¶alepoko·rov¶any, a tak u·znyn¶³nen¶³probl¶emsi na str¶ank¶ach zahr¶at,ne zrovna trivi¶aln¶³,pln·egra¯ckou hru. Reknete· si to asi nen¶³oby·cejn¶eHTML, CSS a JavaScript. R¶³k¶ase· jim RIA, internetov¶e aplikace funguj¶³c¶³za pomoci plug-inu v prohl¶³·ze·ci. Tato pr¶acesi d¶av¶aza c¶³lsezn¶amen¶³s novou technologi¶³Microsoftu na tvorbu RIA aplikac¶³ (kap.2), naz¶yvanou Silverlight(kap.3). Silverlight umo·z·nujevytv¶a·ret aplikace p·r¶³stupn¶ena internetu s funk·cnost¶³srovnatelnou s aplikacemi desktopov¶ymi.Jeliko·zje Silverlight pom·ern·enov¶atechnologie bude nejd·r¶³ve t·rebaobjevit jej¶³mo·znostia limity, stejn·ejako poznat jak se s n¶³ pracuje. C¶³lem pr¶aceje vytvo·ritu·zivatelsky p·r¶³jemnou aplikaci(kap.5.3) na tvorbu rozvrhu ·skoly, b·e·z¶³c¶³na Silverlightu. 1 Kapitola 2 RIA Koncept bohat¶ych internetov¶ych aplikac¶³existoval mnoho let pod rºuzn¶ymijm¶eny(Remote Spring-Microsoft 1998, X Internet-Forrester Research 2000 ), ale a·zv roce 2002 byl uveden pojem RIA. Ten zavedla spole·cnostMacromedia(nyn¶³Adobe). Pojem RIA (Rich Internet Application) se ned¶ajednozna·cn·especi¯kovat. De¯nice Rich Internet Application obsahuje t·rislova Internet, Application jejich v¶yznamje jed- nozna·cn¶y.Se slºuvkem Rich u·zto tak jednozna·cn¶enen¶³.Pr¶av·eten d·el¶az RIA nejed- nozna·cn¶ypojem. Obecn·ejsou RIAs webov¶eaplikace, kter¶ese sna·z¶³p·reklenoutrozd¶³ly

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    77 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us