Sunum yükleniyor. Lütfen bekleyiniz

Sunum yükleniyor. Lütfen bekleyiniz

4/3/ :47 PM © 2004 Microsoft Corporation. All rights reserved.

Benzer bir sunumlar


... konulu sunumlar: "4/3/ :47 PM © 2004 Microsoft Corporation. All rights reserved."— Sunum transkripti:

1 4/3/2017 11:47 PM © 2004 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2 Visual Studio 2005 and ASP.NET 2.0
4/3/ :47 PM Visual Studio 2005 and ASP.NET 2.0 Selçuk Yavuz Yazılım Eğitmeni © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

3 ASP.NET 2.0 Yenilikleri Controls Framework Page Services and APIs Data
4/3/ :47 PM ASP.NET 2.0 Yenilikleri Data Controls Login Controls Web Parts Other New Controls Controls Master Pages Themes and Skins Improved Client Scripting Compilation & Localization Framework Page Membership Role Management Profiles Configuration ASP.NET 2.0's numerous new features can be grouped into three categories: new controls (more than 50 in all), new features in the page framework, and new services. In addition, myriad enhancements have been made to existing controls and services. The features covered in this session include: Master pages Data controls (and data access in general) Membership, role management, and login controls Profiles Site maps Services and APIs Site Maps Health Monitoring Other New Services © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

4 Master Pages Miras alarak içerik oluşturma Master Page Content Page
4/3/ :47 PM Master Pages Miras alarak içerik oluşturma Master Page Content Page ASP.NET 2.0 introduces a number of new features designed to help developers build cutting-edge UIs with a minimum of effort. First there's master pages, which enable pages to be templatized and which enjoy great design-time support in the Visual Studio 2005 IDE. Next, there's themes and skins, which allow controls, pages, and even entire sites to be visually themed with the stroke of a mouse. Finally, ASP.NET 2.0 introduces about 50 new control types ranging from the simple (e.g., BulletedList and ImageMap) to the sublime (e.g., GridView, DetailsView, Menu, TreeView, and Wizard). This slide depicts master pages. On the left is a master page as seen in the Visual Studio 2005 IDE. On the right is a content page that uses that master page, also shown in Visual Studio. Note the rich design-time exeprience: when the content page is open in the designer, content declared in the page itself is shown in full color, while content inherited from the master page is shown in half-color. Master pages enable developers to build templates that contribute code and content to other pages ("content pages") on the site. Because ASP.NET 1.x lacked template support, developers often resorted to factoring common UI elements--elements that appear on multiple pages--into user controls and then declaring the user controls in each page that uses them. Master pages provide a more elegant solution to the problem of defining common look and feel. The term "visual inheritance" is often used to describe master pages because content pages inherit appearance from master pages the same way derived classes inherit methods, properties, and other type members from base classes. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

5 4/3/ :47 PM How Master Pages Work Master pages ortak içerikleri ve içerik yertutucuları içerir İçerik sayfaları master pages’lere referans edilir ve yer tutucuları içerikle doldurur Site.master default.aspx The first and most important concept to grasp when learning about master pages is that of Content and ContentPlaceHolder controls. Master pages use ContentPlaceHolder controls to define where content pages can plug in content. Content pages plug in content by declaring Content controls whose ContentPlaceHolderID properties match ContentPlaceHolder IDs in the master. A master page can contain an unlimited number of ContentPlaceHolder controls. All content defined in content pages MUST appear in Content controls--that is, between <asp:Content> and </asp:Content> tags. Content-PlaceHolder Content © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

6 Page.Master System.Web.UI.Page namespace’ine ait yeni bir özelliktir
4/3/ :47 PM Page.Master System.Web.UI.Page namespace’ine ait yeni bir özelliktir Programlanabilir Master Pages ile içerik sayfaları oluşturmayı sağlar Sayfanın bir Master'a sahip olup olmadığını tanımlar Tanımlanmış Master içindeki kontrollere erişim imkanı sağlar Tanımlanmış Master içindeki public metodlara erişim imkanı sağlar Kod seviyesinde Master Pages ve içerik sayfalarının bütünleştirilmesi sağlar In practice, master pages often include controls that need to be accessed at run-time by content pages. In ASP.NET 2.0, the System.Web.UI.Page class includes a new property named Master that contains a reference to a content page's master page (or null if the page lacks a master page). This enables controls defined in master pages to be supported by code contained in content pages. Of course, master pages can also include code that interacts with controls declared in master pages. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

7 Selçuk Yavuz Yazılım Eğitmeni syavuz@mutasyon.net
4/3/ :47 PM Master Pages Selçuk Yavuz Yazılım Eğitmeni Follow the instructions in Demo-Web-1.doc. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

8 Data Source Controls Veri Bağlama Tanımlamaları ("kodsuz") Sql-
4/3/ :47 PM Data Source Controls Veri Bağlama Tanımlamaları ("kodsuz") Sql- DataSource Object- DataSource Access- DataSource Xml- DataSource SiteMap- DataSource Data Component Site Map Provider ASP.NET 2.0 makes building data-driven sites easier than ever before by introducing declarative data binding utilizing data source controls (which dramatically reduce the amount of code you have to write), providing new (and very rich) data controls such as GridView and DetailsView, introducing SQL cache dependencies (which allow cached items to be keyed to database entities), and offering an expanded and simplified syntax for data-binding expressions. Data source controls (shown here) reduce the amount of code you write by replacing code that queries data sources and binds the results to controls with <asp:> tags. In Visual Studio 2005, you can create these tags using drag-and-drop. You can also use the Visual Studio 2005 IDE to configure data sources. ObjectDataSource controls are particularly interesting because they allow you to practice declarative data binding without sacrificing the ability to perform data accesses with data access components. ObjectDataSources place declarative wrappers around data components. SQL Databases Any Data Access Databases XML Data Site Maps © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

9 Veri Kontrolleri Yeni veriye-bağlı kontroller
4/3/ :47 PM Veri Kontrolleri Yeni veriye-bağlı kontroller Seçme, Düzenleme, Sayfalama, Sıralama ve bir çok işlemi destekler GridView DetailsView FormView GridView is best described as a super DataGrid: it does everything DataGrid does and then some. Unlike the DataGrid, which requires code to do sorting, paging, selecting, and editing, the GridView control can perform all these actions innately--that is, with no code. GridView also supports a richer assortment of column types than DataGrid. Whereas GridView is designed to render sets of records into HTML tables, DetailsView is designed to take one record or a set of records and display them one at a time. Built-in paging support enables records bound to a DetailsView to be browsed with no code. Built-in editing support allows records to be inserted, updated, and deleted, again with no code (although the reality is that you'll end up writing some code to handle concurrency issues and respond to update failures). The same field types--ImageField, CheckBoxField, and so on--that can be declared in a GridView can also be declared in a DetailsView. In demonstrations, DetailsView controls are often paired with GridView controls to implement master-detail views. However, DetailsView is perfectly capable of working without GridView. The DetailsView control shown here is currently in editing mode. FormView is similar to DetailsView but is entirely template-driven (in the same way that Repeater controls are entirely template-driven). © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

10 4/3/ :47 PM Veri Bağlama Veri kontroleri ile kullanıcı arabirimleri ile verinin değiştirilebilmesini destekler AutoGenerateXxxButton özellikleri Insert/EditRowStyle özellikleri Inserting/ed, Updating/ed, Deleting/ed olayları Veri kaynakları mantıksal işlemleri destekler Insert/Update/DeleteCommand özellikleri Insert/Update/DeleteParameters özellikleri Data source contols can fetch data from data sources, but they can update the data sources, too--a feature known as 2-way data binding. In addition, data controls such as GridView and DetailsView contain built-in editing support. 2-way data binding vastly reduces the effort required to build Web-editable UIs. RE: "Visual Studio supplies the glue." There can be a lot of work involved in defining the InsertCommand, UpdateCommand, and DeleteCommand properties of a data source control, not to mention the InsertParameters, UpdateParameters, and DeleteParameters sections that accompany them. Visual Studio's Configure Data Source command will do most of that work for you. It even lets you decide whether the UpdateCommands and DeleteCommands that it generates implement a first-in wins or last-in wins strategy, which determines what happens when multiple users edit the same data at the same time. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11 Ön Bellekleme Birçok veri kaynakları önbelleklemeyi desteklemektedir
4/3/ :47 PM Ön Bellekleme Birçok veri kaynakları önbelleklemeyi desteklemektedir EnableCaching – Önbelleği aktifleştirir/deaktifleştir CacheDuration - süre (saniye) CacheExpirationPolicy - kademeli veya sabit Kodsuz veri önbellekleme! In ASP.NET 1.x, you had to write code to cache query results. In 2.0, the data source controls will do the caching for you. Caching is enabled by setting EnableCaching="true" and CacheDuration to the number of seconds you want the data cached. Under the hood, data source controls uses the ASP.NET application cache to store the data. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

12 Önbellekleme Senkronizasyonu
4/3/ :47 PM Önbellekleme Senkronizasyonu SQL Server 7, SQL Server 2000, ve SQL Server 2005 ile çalışır SQL Server 7 and SQL Server 2000 için ön hazırlık gerekir. Aspnet_regsql.exe sadece SQL 2005 ile çalışır. SQL cache dependencies are one of ASP.NET 2.0's coolest new features. In ASP.NET 1.x, you could place items in the application cache and create dependencies between those items and objects in the file system or other objects in the cache. Missing, however, was a means for creating dependencies between cached items and database entities, which would enable cached query results to be automatically evicted from the cache if the underlying data changed. SQL cache dependencies ("CacheSync") do exactly that. SQL cache dependencies are more powerful when paired with SQL Server 2005 because 1) they are more granular (row level versus table level), 2) they don't rely on polling (instead relying on query notifications from SQL Server 2005), and 3) they require no preparation of the database. Set a data source control's SqlCacheDepdendency property to "CommandNotification," for example, and CacheSync just works! NOTE: A late-breaking change to ASP.NET 2.0's CacheSync feature requires an application to call System.Data.SqlClient.SqlDependency.Start () before using SQL cache dependencies. This is easily accomplished by adding an Application_Start method to Global.asax. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

13 Selçuk Yavuz Yazılım Eğitmeni syavuz@mutasyon.net
4/3/ :47 PM Veri Girişleri Selçuk Yavuz Yazılım Eğitmeni Follow the instructions in Demo-Web-2.doc. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

14 Membership Servisleri
4/3/ :47 PM Membership Servisleri Üye yönetimi Yetkileri Web Site Admin Tool ile tanımlanır Membership API ile programlanabilir Forms tabanlı yetkilendirme basitleştirildi Kullanıcı adı ve parola doğrulama, yeni hesap oluşturma ve benzeri işlevleri sağlar The Membership service dramatically reduces the amount of code required to implement forms authentication. In ASP.NET 1.x, you had to supply the code to validate and store credentials. In version 2.0, most of that is done for you. The provider model allows credentials to be stored in SQL Server databases or any other medium for which a membership provider is available. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

15 SqlMembershipProvider ActiveDirectory-MembershipProvider
4/3/ :47 PM Membership Şeması Kontroller Login LoginStatus LoginView Other Membership API Membership MembershipUser Membership Sağlayıcılar SqlMembershipProvider ActiveDirectory-MembershipProvider Other Providers This diagram depicts the provider model used by the Membership service. The application talks to the Membership service through classes such as Membership and MembershipUser. These classes, in turn, read and write membership data by calling a provider. (Each class has a property named Provider that identifies the associated provider.) Each provider interfaces with a particular type of data store. If none of the providers supplied with the Framework supports the data store you wish to use (for example, an Oracle database), you can write a provider of your own or acquire one from a third party. The Membership service is one of several ASP.NET 2.0 services that are provider-based. Membership Veri Katmanları SQL Server Active Directory Other Data Stores © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

16 Role Manager Rol tabanlı güvenlik yönetimi
4/3/ :47 PM Role Manager Rol tabanlı güvenlik yönetimi Yetkileri Web Site Admin Tool ile tanımlanır Roles API ile programlanabilir Form bazlı yetkilendirme ile geliştirilmiş sitelerde Rol bazlı güvenlik uygulamalarını basitleştirir Her isteği rollere göre denetler Rol bilgilerini saklamayı destekler In ASP.NET 1.x, combining forms authentication with role-based authorization required the developer to write code--typically an Application_AuthenticateRequest method in Global.asax--to append role information to each request. The Role Management service (or "role manager") does this for you, making role-based security a snap to implement. Like the login controls, this service integrates tightly with the Membership service but can also be used without it. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

17 Role Management Şeması
4/3/ :47 PM Role Management Şeması Kontroller Login LoginStatus LoginView Other Role API Roles Role Sağlayıcıları SqlRole-Provider AuthorizationStore-RoleProvider WindowsToken-RoleProvider Other Providers The Role Management API is embodied in the Roles class, which provides methods for creating roles, adding users to roles, and more. The Roles class doesn't interact with roles data stores directly; rather, it uses role providers. Role Veri Katmanları SQL Server Authorization Manager ("AzMan") Other Data Stores © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

18 4/3/ :47 PM Login Kontrolleri Yetkilendirme bazlı uygulamalar için kullanıcı arabirimleri Login LoginName LoginStatus Membership & Role Management LoginView CreateUser- Wizard Combined with the Membership service and Role Manager, these new controls further reduce the amount of code required to implement forms authentication. They also promote a standard look and feel. Despite their high level of integration with the Membership and Role Management services, login controls can also be used without them. In addition to providing a standard UI for such security-related tasks such as logging in and changing passwords, these controls also provide logic for accomplishing these tasks. That logic is easily overridden so you can apply logic of your own. Change- Password Password- Recovery © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

19 LoginView <asp:LoginView ID="LoginView1" Runat="server">
4/3/ :47 PM LoginView <asp:LoginView ID="LoginView1" Runat="server"> <AnonymousTemplate> <!-- Content seen by unauthenticated users --> </AnonymousTemplate> <LoggedInTemplate> <!-- Content seen by authenticated users --> </LoggedInTemplate> <RoleGroups> <asp:RoleGroup Roles="Administrators"> <ContentTemplate> <!-- Content seen by administrators --> </ContentTemplate> </asp:RoleGroup> ... </RoleGroups> </asp:LoginView> The LoginView control simplifies the task of showing different content to different users based on whether they're authenticated and, if they are authenticated, what roles they belong to. This slide illustrates the LoginView control schema. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

20 Selçuk Yavuz Yazılım Eğitmeni syavuz@mutasyon.net
4/3/ :47 PM Membership and Roles Selçuk Yavuz Yazılım Eğitmeni Follow the instructions in Demo-Web-3.doc. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

21 Profiles Tüm kullanıcılarını verilerini saklayabilir
4/3/ :47 PM Profiles Tüm kullanıcılarını verilerini saklayabilir Uzun süreli erişilebilme Yetkili ve yetkisiz kullanıcılar Geniş veri tipi tanımlama desteği Class tanımlama desteği The new profile service makes short work of storing personalization settings and other per-user settings persistently. Classic applications for it include storing "favorites" (like the "My eBay" portion of eBay, which, among other things, lists auction items that you've bookmarked so you can scrutinize them later on) and user preferences. The service is profile-based. You define a profile in Web.config, and ASP.NET dynamically compiles that profile, provides strongly typed access to it, and persists profile data. Moreover, profiles work with both anonymous and authenticated users. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

22 Profile Definition <profile> <properties>
4/3/ :47 PM Profile Definition <profile> <properties> <!-- String property --> <add name="MyName" /> <!-- Int32 property with default value --> <add name="MyFavoriteNumber" type="System.Int32" defaultValue="0" /> <!-- DateTime property --> <add name="MyBirthday" type="System.DateTime" /> <!-- Custom type; auth. and anon. users --> <add name="MyItems" type="ShoppingCart" serializeAs="binary" allowAnonymous="true" /> </properties> </profile> This sample profile demonstrates how profiles are defined in Web.config. It also demonstrates that profile properties can consist of any data type, including custom data types (e.g., ShoppingCart). At run-time, ASP.NET generates a class that has the same properties defined in the profile. Furthermore, it exposes an instance of that class to pages through a pseudo-property named Profile. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

23 Selçuk Yavuz Yazılım Eğitmeni syavuz@mutasyon.net
4/3/ :47 PM Profiles Selçuk Yavuz Yazılım Eğitmeni Follow the instructions in Demo-Web-4.doc. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

24 Veritabanlı Site Navigasyonu
4/3/ :47 PM Veritabanlı Site Navigasyonu Yeni kontroller site navigasyonunu kolaylaştırdı TreeView ve Menu – Navigasyon Arabirimi SiteMapDataSource - XML site maps SiteMapPath - “Ekmek kırıntısı" kontrolleri Easy site navigation is an important element of modern Web applications. Because much of the time spent developing a site is devoted to building menus, tree views, and other navigational aids, and because changes to a site’s structure require commensurate changes to the navigation UI, ASP.NET 2.0 addresses the issue of site navigation head-on. Menu and TreeView controls simplify the task of building navigation UIs; SiteMapDataSource controls enable changes to a site’s structure to automatically propagate to the navigation UI; and SiteMapPath controls make short work of implementing “bread-crumb” elements showing the path to the current page. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

25 Site Navigation Schema
4/3/ :47 PM Site Navigation Schema Controls Menu TreeView SiteMap- DataSource SiteMapPath Site Map API SiteMap SiteMapNode SiteMapNode SiteMapNode Providers XmlSiteMapProvider Other Site Map Providers Site navigation uses the layered architecture shown here. Controls such as Menu and TreeView provide the navigation UIs. Classes such as SiteMap and SiteMapNode provide the API that the controls rely on and also constitute an API you can use yourself. Site navigation is provider-based, and the one site map provider that comes with ASP.NET 2.0--XmlSiteMapProvider--reads site maps from XML data files. By default, those files are named Web.sitemap. Custom site map providers--for example, SQL site map providers that retrieve site maps from databases--are relatively easy to write. SQL site map provider implementations can already be freely downloaded from the Web. One such sample is available for free in Microsoft's ASP.NET 2.0 provider toolkit. Site Maps Web.sitemap Other Data Stores © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

26 XML Site Map <?xml version="1.0" encoding="utf-8" ?>
4/3/ :47 PM XML Site Map <?xml version="1.0" encoding="utf-8" ?> <siteMap> <siteMapNode> <siteMapNode title="Home" url="~/Default.aspx" /> <siteMapNode title="Tickets" url="~/Tickets.aspx" /> <siteMapNode title="Concert Gear" url="~/Gear.aspx" /> <siteMapNode title="Backstage" url="~/MembersOnly/Backstage.aspx" /> <siteMapNode title="Preferences" url="~/MembersOnly/Preferences.aspx" /> </siteMapNode> </siteMap> Each <siteMapNode> element represents one node in the site map. Nodes can be nested to represent hierarchical site structures. Note that XmlSiteMapProvider requires every URL in the site map to be unique. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

27 Güvenlik boşlukları <?xml version="1.0" encoding="utf-8" ?>
4/3/ :47 PM Güvenlik boşlukları <?xml version="1.0" encoding="utf-8" ?> <siteMap> <siteMapNode roles="*"> <siteMapNode title="Home" url="~/Default.aspx" /> <siteMapNode title="Tickets" url="~/Tickets.aspx" /> <siteMapNode title="Concert Gear" url="~/Gear.aspx" /> <siteMapNode title="Backstage" roles="Members" url="~/MembersOnly/Backstage.aspx" /> <siteMapNode title="Preferences" roles="Members" url="~/MembersOnly/Preferences.aspx" /> </siteMapNode> </siteMap> "Security trimming" refers to a site map provider's ability to hide nodes from users who lack proper authorization. Authorization is role-based and is enacted by including roles attributes in <siteMapNode> elements. Of course, you can use ASP.NET's Role Management service to define roles and map users to roles. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

28 Selçuk Yavuz Yazılım Eğitmeni syavuz@mutasyon.net
4/3/ :47 PM Site Navigation Selçuk Yavuz Yazılım Eğitmeni Follow the instructions in Demo-Web-5.doc. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

29 4/3/ :47 PM VSIP Partners These tools are at the core of enabling customers to build this new breed of XML Web services-based applications. Already, a host of global ISVs are delivering solutions using XML Web services, the .NET Framework, and VS .NET. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

30 © 2005 Microsoft Corporation. All rights reserved.
4/3/ :47 PM © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


"4/3/ :47 PM © 2004 Microsoft Corporation. All rights reserved." indir ppt

Benzer bir sunumlar


Google Reklamları