1 / 37

Core . NET Programmer Guide

Core . NET Programmer Guide. by Hendi Wibowo. Application Architecture. System Requirement. Database Server DBMS (MS SQL Server 200 8 or later running on Windows Server Family OS) Optimal requirement for hardware and network Application Server

dara
Download Presentation

Core . NET Programmer Guide

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Core.NETProgrammer Guide by HendiWibowo

  2. Application Architecture

  3. System Requirement • Database Server • DBMS (MS SQL Server 2008 or later running on Windows Server Family OS) • Optimal requirement for hardware and network • Application Server • Web Server (IIS 7 or later running on Windows Server Family OS) • Crystal Report 11 Runtime + Designer (opt) • Optimal requirement for hardware and network • Client • Browser IE 7 running on Windows Family OS • Optimal requirement for hardware and network

  4. MVC as Point of View • Modeller : a set of classes and interfaces that can be used to retrieve data from database • Viewer : a set of classes and template page (*.aspx and *.ascx) to present data. Can be used to develop form entry and Gridview page • Controller : a set of classes must be created by programmer to control viewer and modeller.

  5. Software Factories • A software factory may include processes, templates, IDE configurations and views • the methodology starts by identifying and classifying architectural styles for frequently encountered families of solutions, such as web portals, smart clients and connected systems (Experience) • Software Factories supply reusable assets to help users enact the processes. Assets : documents, such as patterns, guidelines and check lists, some are tools, such as designers, wizards, and scripts, some are assets used by tools, such as templates, models and configuration files, and some are executables, such as libraries, frameworks and sample code • The assets are delivered in a structured and installable package called a software factory template (Starter Kit)

  6. Application Layer

  7. Konsep OOP dalam Core.NET • Encapsulation • Interface • Abstract Class • Class • Object • Property • Method • Constructor/Destructor • Object Creation • Inheritance • Override • Overload • Polymorphisme • Pemanggilan Pesan

  8. 2. Create XML File 1. Create A New Class extends from IDataControl 3. Edit dao.config and SqlMap.config 5. Build dll and deploy 4. Edit Page Controller

  9. JtahunControl dc = new JtahunControl(); IList list = dc.View(“All”); <?xml version="1.0" encoding="utf-8" ?> <sqlMap namespace="Jtahun" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <alias> <typeAlias alias="Jtahun" type="Valid49.BO.JtahunControl" /> </alias> <resultMaps> <resultMap id="return-result" class="Jtahun"> <result property="Kdtahun" column="KDTAHUN"/> <result property="Nmtahun" column="NMTAHUN"/> </resultMap> </resultMaps> <statements> <select id="QueryByAllJtahun" parameterClass="Jtahun" resultMap="return-result"> SELECT KDTAHUN.NMTAHUN FROM JTAHUN order by KDTAHUN </select> </statements> </sqlMap>

  10. Core.NET • CoreNET.Common.Base (Base Class/Interface) • CoreNET.Common.BO(Adapter into Modeller) • CoreNET.Common.UI (Adapter into View) • CoreNET.Common.Controls(collection of default controller ) • CoreNET.Common.Utils (collection of function/method)

  11. Alur Proses

  12. Relasi antar Artefact

  13. Modeller • Base Classes • BaseBO • BaseParameter • BaseContextDao • BaseDataControl, BaseDataControlUI, BaseDataControlUIEntry, BaseDataControlValidateEntry • Interfaces • IDataControl, IDataControlUI, IDataControlUIEntry • Configuration File • SQLMap.config (to register XML Query files) • Dao.config (to register DaoProxy) • XML Query files create by programmers to define SQL query to access database

  14. Viewer • Base Classes • BaseViewList, BaseViewListLookup, BaseViewListTreeLookup • ViewListProperties • ParameterRow • User Control  *.ascx • FormEntry.ascx • ViewList.ascx • ViewList2.ascx • Pages (as template or base page)  *.aspx • PageAAA.aspx • PageReport1x.aspx • SiteMap and Mapper • Menu.sitemap to register url menu with formatted query string • Utility.cs to map menu and controller class

  15. Controller • to control viewer and modeller • created by programmers, inheritance from abstract class BaseDataControl and implements IDataControl

  16. Framework Architecture

  17. Component Diagram

  18. Class/Component Dependency

  19. Simple Page - View

  20. Simple Page - Entry

  21. Simple Page : Fitur • Menampilkandata dalambentuk table yang terdiridaribeberapakolom • Menampilkan parameter untukmemfilter data yang akanditampilkan • Menyediakanfasilitasuntukmengisi, mengeditdanmenghapus data; untukpengisian data bisadalambentuk form entry, table lookup atau tree view/drilldown lookup • Menyimpan data (export) kedalam format csv • Merekam data (log) yang terlibatdalamaktifitaspengisian, pengeditandanhapus data olehpenggunatertentu • Mencetakinformasiperbaris data table atauseluruh data padahalamantersebut • Memungkinkanvalidasi data yang kompleks • Menampilkan tab control

  22. Simple Page : How To • GetProperties() : untukmendefinisikan property tabel • GetColumns() : untukmenampilkan data dalambentuk table yang terdiridaribeberapakolom • GetFilters() : untukmendefinisikan filter data yang akanditampilkan , yang biasanyadigunakanpada query untukmendefinisikankondisi WHERE

  23. GetProperties (1) • TitlePage : Judul page yg muncul pada browser • TitleList : Judul yang muncul pada panel grid • TitleFilter: Judul yang muncul pada panel filter • WidthPage: lebar page • WidthForm: lebar form entry • PageSize: jumlah baris yang muncul pada grid • PrimaryKeys: field-field yang merupakan primary key dari tabel • ReadOnlyFields: field-field yang readonly ketika tambah/edit/hapus • AllowNulls: field-field yang jika kosong berisi nilai null • FindFields : label yang muncul pada combo pencarian • Footers : definisi footer; eg. (0, 2, 1) • ModeGrid: memunculkan edit, delete/tree di grid • ModePage: memunculkan tombol tambah di page • RefreshFilter: true jika ketika memilih data di grid, merefresh filter • EntryStyle: pilihan style pengisian : form entry, lookup entry, tree lookup entry

  24. GetProperties (2) • Fitur Entry Style Form : • PageEntry : jumlah entry dalam form entry • Fitur Entry Style Lookup : • LookupLabelQuery: • LookupFindFields : • WidthLookup(s) : • Fitur Entry Style Tree View : • LookupLabelQuery : • TreeNodeType : • ClickStyle : • Fitur Export : • CanExport : • ExportFields:

  25. GetProperties (3) • Fitur Log : • LogFields : • Fitur Report : Pada page dapatditampilkantombolcetak di setiapbarisGridViewatausebuahtombolcetakpada page untukmencetak data di page tersebut • ModePageReport : • RptName : • FiturValidasi • ForceOtentikasi : • TglNotValidFields : • ValidateCol : • FiturTabControl • TitleLinks : • Fitur Master-Detail • RefreshParent : • DefaultTabListDetil : • ForcePageSize

  26. Master - Detail Page

  27. Master - Detail – Detail Page

  28. Path • Sipkd (website) • App_Data (XML-Query Files location, mapped in SQLMap.config/*.xml) • Ascx (User control location/*.ascx) • Bin (referenced library/*.dll) • pPage (Page file location/*.aspx) • pSistem (Common page file location/*.aspx) • MyLibrary (library) • DataControl (Controller location/*.cs)

  29. Create Menu • Create Controller (or generate from table of database using Core.NET Gen) • Create XML-Query Files (or generate from table of database using Core.NET Gen) • Define sitemap • Define mapper

  30. Setting Option • Define entry WEBSET : • KDSET = ’alokas’ (option code) • MODEENTRY=0 or 1 (0 if typed, 1 if selected) • VALLIST= ’Bulanan=B;Triwulan=T’ (if mode entry = 1) • VALSET = ’B’ (value) • VALDESC=’Periodisasi Alokasi Kas’ (description) • Add KDSET in WEBSET.xml, statement QueryBy[Suffix]Webset, egQueryByDmWebset <select id="QueryByDmWebset" extends="BaseQueryWebset" parameterClass="Webset" resultMap="return-result"> where A.KDSET in (‘alokas') order by A.VALDESC </select> • Define Constant in Webset.cs public const string ALOKAS = "alokas"; • Call setting if (WebsetControl.GetValset(HttpContext.Current,WebsetControl.ALOKAS) == ‘B’ ){}

More Related