2015. 6. 16. 09:45 프로그래밍/ASP/ASP.NET
ASP.NET 기초
'프로그래밍 > ASP/ASP.NET' 카테고리의 다른 글
COM (Component Object Model) 기초 (0) | 2015.06.09 |
---|---|
ASP 기초 (0) | 2015.06.09 |
.NET의 개념 (0) | 2015.05.24 |
2015. 6. 16. 09:45 프로그래밍/ASP/ASP.NET
COM (Component Object Model) 기초 (0) | 2015.06.09 |
---|---|
ASP 기초 (0) | 2015.06.09 |
.NET의 개념 (0) | 2015.05.24 |
2015. 6. 9. 10:34 프로그래밍/ASP/ASP.NET
COM: a binary standard that enables software components to inter-operate in a networked environment regardless of the language in which they were developed
"local" 서버에 등록 (that are instantiated with CreateObject)
COM+:
- evolution of Microsoft COM and MTS.
- handles many of the resource management tasks that you previously had to program yourself, such as thread allocation and security.
- makes your applications more scalable by providing thread pooling, object pooling, and just-in-time object activation
- administrators can deploy and administer COM+ applications through a graphical user interface, or automate administrative tasks using a scripting or programming language.
- Software developers can use COM+ to visually configure routine component and application behavior, such as security and participation in transactions, and to integrate components into COM+ applications.
Component Services (COM+) consists of the latest version of COM, distributed COM (DCOM), and Microsoft Distributed Transaction Coordinator (DTC), plus additional functionality. With COM+,
To open COM+, click Start, point to Programs, point to Administrative Tools, and then click Component Services. Component Services is also available in Transaction Integrator (TI) Manager as follows: Start TI Manager and double-click the Component Services folder.
Component Services provides standard application functionality for administration, deployment, security, reliability, and scalability. Component Services simplifies the administrator's work by providing a tool for administering all applications visually through a single user interface.
COM+ contains some enhandced features.
YOu can call com server in dotnet compoenet.you can not directly communicate with com from dotnet client. You will have to use proxy (Runtime callable wrapper) to communicate between them.
Com and Com+ is considerend unmanaged because they do not contain the assembly meta data.
Com and com+ are binary standard.
Extension of com and com+ component is dll.
DCOM: Distributed-COM. The protocol that enables a COM object to be instantiated on another computer from the one that is using the code (ie. call from a client machine in London, but the code runs on the machine in New York)
ActiveX control: client side 에서 실행됨
ATL (Active Template Library): a set of template-based C++ classes that let you create small, fast COM objects. It has special support for key COM features, including stock implementations, dual interfaces, standard COM enumerator interfaces, connection points, tear-off interfaces, and ActiveX controls.
The Component Object Model (COM) is a "binary" standard that enables software components to interoperate in a networked environment regardless of the language in which they were developed.
Dividing software into clients and objects enables you to use those clients and objects as building blocks that can be combined and reused in many different ways by many different clients, just as standard building materials can be used to construct many different structures.
COM and COM+ are the key technologies that provide the infrastructure that enables clients and objects to work together. Other key COM concepts include methods, interfaces, classes, references, and components, which build on the foundation of clients and objects.
This section contains:
What is COM?Microsoft COM (Component Object Model) technology in the Microsoft Windows-family of Operating Systems enables software components to communicate. COM is used by developers to create re-usable software components, link components together to build applications, and take advantage of Windows services. COM objects can be created with a variety of programming languages. Object-oriented languages, such as C++, provide programming mechanisms that simplify the implementation of COM objects. The family of COM technologies includes COM+, Distributed COM (DCOM) and ActiveX® Controls. Microsoft provides COM interfaces for many Windows application programming interfaces such as Direct Show, Media Foundation, Packaging API, Windows Animation Manager, Windows Portable Devices, and Microsoft Active Directory (AD). COM is used in applications such as the Microsoft Office Family of products. For example COM OLE technology allows Word documents to dynamically link to data in Excel spreadsheets and COM Automation allows users to build scripts in their applications to perform repetitive tasks or control one application from another. |
COM+ is the name of the COM-based services and technologies first released in Windows 2000. COM+ brought together the technology of COM components and the application host of Microsoft Transaction Server (MTS). COM+ automatically handles programming tasks such as resource pooling, disconnected applications, event publication and subscription and distributed transactions.
ASP.NET 기초 (0) | 2015.06.16 |
---|---|
ASP 기초 (0) | 2015.06.09 |
.NET의 개념 (0) | 2015.05.24 |
2015. 6. 9. 08:48 프로그래밍/ASP/ASP.NET
- 사용자가 요청한 ASP페이지는 ASP.DLL을 무조건적으로 거치며, ASP.DLL을 통해 해석이 되어진 뒤에 모든 ASP 코드들이 HTML 태그로 바뀌어지고, 사용자에게 건네어지는 것이다.
예제: HelloWorld.asp
<HTML>
<HEAD><title></title></HEAD>
<BODY>
<% for i = 1 to 10 step 1 %>
Hello World !<br>
<% next %>
</BODY>
</HTML>
선언 및 생성
1. Dim - 변수를 선언. (예: Dim strName)
2. Set - 개체를 생성. (예: Set rs = Server.CreateObject("ADODB.RecordSet"))
논리 구문
3. IF ~ THEN - 만약 ~ 라면. (조건이 적은 경우)
4. SELECT CASE - 만약 ~ 라면. (조건이 많은 경우)
5. FOR ~ NEXT - 순환하면서 실행. (반복 횟수를 정확하게 알고 있을 때)
6. DO WHILE - 순환하면서 실행. (반복 횟수를 정확하게 알 수 없을 때)
데이터 타입
1. 숫자 서브 타입 정수나 분수, 또는 부동 소수점 등 다섯 개의 타입이 있다.
2. 문자열 서브 타입 텍스트 정보를 보관한다.
3. 날짜 서브 타입 날짜와 시간을 보관하는 데 쓰이는, 미리 정해진 타입이다.
4. 부울린 서브 타입 참, 거짓을 의미하는 TRUE 또는 FALSE 값 중 하나를 가진다.
5. 그 외의 서브 타입 Empty, Null 등을 알아본다.
변환 함수
1. 숫자 서브 타입 관련 CInt, CLng, CByte, CSng, CDbl, CCur, Fix, Int, Abs
2. 문자열 서브 타입 관련 CStr, Asc, AscB, AscW, Chr, ChrB, ChrW
3. 날짜 서브 타입 관련 CDate, DateValue, TimeValue, DateSerial, TimeSerial
4. 부울린 서브 타입 CBool
5. 기타 변환 함수 Hex, Oct, Sgn
문자열 관련 함수
1. UCASE, LCASE 문자열의 내용을 대문자, 소문자로 변환시켜준다.
2. LEN 문자열의 길이를 반환한다.
3. LEFT, RIGHT, MID 문자열의 좌, 우, 중간에서 지정한 만큼의 문자열을 뽑아낸다.
4. INSTR, INSTRREV 해당되는 문자열의 좌측, 우측 위치를 반환한다.
5. LTRIM, RTRIM, TRIM 문자열의 좌측, 우측, 전체의 공백을 제거한다.
6. REPLACE 문자열의 내용중 일부를 다른 문자열로 변경한다.
7. SPLIT 문자열에서 특정 문자열을 기준으로 나누어 배열로 저장한다.문자열 관련 함수
register.asp | register_ok.asp |
<HTML> <HEAD> <TITLE></TITLE></HEAD> <BODY> <FORM METHOD=POST ACTION=register_ok.asp> 이름 : <INPUT TYPE=TEXT NAME=txtName><BR> Email : <INPUT TYPE=TEXT NAME=txtEmail><BR> 전화번호 : <INPUT TYPE=TEXT NAME=txtPhone><BR> <INPUT TYPE=SUBMIT VALUE='전송'> </FORM> </BODY> </HTML> |
<% DIM strName, strEmail, strPhone
strName = Request.Form("txtName") strEmail = Request.Form("txtEmail") strPhone = Request.Form("txtPhone")
Response.Write "이름 = " & strName & "<BR>" Response.Write "Email = " & strEmail & "<BR>" Response.Write "전화 = " & strPhone & "<BR>" %> |
Active Server Pages 개체 모델
1. Request 개체
2. Response 개체
3. Application 개체
Collections:
Contents: A collection of all the items that have been added to the Application object.
StaticObjects: Collection of all the items that have been added to the Application object through <object> tag.
Methods:
Contents.Remove: Deletes the specified item from the Application.Contents collection.
Contents.RemoveAll: Deletes all the items from the Application.Contents collection.
Lock: Locks the application object so that only one user at a time can modify the values.
UnLock: Unlocks the application object allowing other users to modify application level variables.
Events:
Application_OnEnd: This event occurs when the IIS is shut down after Session_OnEnd event. All the variables are destroyed after that.
Application_OnStart: This event occurs when the first .asp page is called after starting the IIS. Application level variables can be declared here.
4. Session 개체
Events:
Session_OnEnd: This event occurs when the session is abandoned or times out for a specific user.
Session_OnStart: Occurs when a new session is started. All the ASP objects are available for you to use. You can define your session wide variables here.
5. Server 개체
1. 페이지가 너무 오래 뜨지 않는 경우를 대비, 한계 시간을 설정한다.
2. 사용자가 전달한 문자열을 HTML 형식으로 변경한다.
3. 사용자가 전달한 문자열을 올바른 URL 문자열의 형식으로 변경한다.
4. 가상 경로(URL)를 서버 컴퓨터의 실제 경로로 변경한다.
5. 다른 페이지로 이동하여 실행 경로를 변경한다.
6. CreateObject 라는 메소드를 사용하여 컴포넌트의 인스턴스를 생성한다.
6. ObjectContext 개체: 트랜잭션을 시작하거나 종료할 때 사용하는 개체, 현재에는 거의 사용하지 않음
7. ASPError 개체: 에러 처리 작업을 위해 ASP 3.0 에서 추가된 개체
ASP.NET 기초 (0) | 2015.06.16 |
---|---|
COM (Component Object Model) 기초 (0) | 2015.06.09 |
.NET의 개념 (0) | 2015.05.24 |
2015. 5. 24. 12:09 프로그래밍/ASP/ASP.NET
.NET > .NET Framework > ASP.NET
.NET의 정의: "XML 웹서비스를 통해 이기종간의 시스템을 통합(SI)하기 위한 플랫폼"
- 웹서비스, 서버, 클라이언트(PC, 모바일, 가전기기), 개발도구(=.NET Framework)) 등등으로 구성됨
.NET Framework란: .NET의 목적을 달성하기 위하여 다양한 기기에서 소비(사용)할 수 있는 웹서비스와 어플리케이션을 개발/구축/실행하게 하는 도구
ASP.NET(2002년): .NET Framework중 "웹" 어플리케이션 개발 framework
- 다른 웹 어플리케이션 개발 framework의 예: ASP, JSP, PHP 등등
웹 어플리케이션들(회원가입, 게시판, 쇼핑몰등)을 조합하여 최종적으로 하나의 웹사이트가 된다.
One ASP.NET
웹사이트 구축 프레임워크
ASP.NET Web Forms
ASP.NET MVC: HTML 완전제어 가능, 단위테스트 가능
ASP.NET Web Pages: 가장단순, HTML과 서버코드 함께작성
웹서비스 구축 프레임워크
ASP.NET Web API
ASP.NET SignalR
ASP.NET 기초 (0) | 2015.06.16 |
---|---|
COM (Component Object Model) 기초 (0) | 2015.06.09 |
ASP 기초 (0) | 2015.06.09 |