KR20000030817A - Server-side component for view contents separation and dynamic liking generation method for web-application development based on MVC model - Google Patents

Server-side component for view contents separation and dynamic liking generation method for web-application development based on MVC model Download PDF

Info

Publication number
KR20000030817A
KR20000030817A KR1020000013925A KR20000013925A KR20000030817A KR 20000030817 A KR20000030817 A KR 20000030817A KR 1020000013925 A KR1020000013925 A KR 1020000013925A KR 20000013925 A KR20000013925 A KR 20000013925A KR 20000030817 A KR20000030817 A KR 20000030817A
Authority
KR
South Korea
Prior art keywords
html
servlet
template
processor
database
Prior art date
Application number
KR1020000013925A
Other languages
Korean (ko)
Other versions
KR100349973B1 (en
Inventor
윤일훈
유영환
유근진
김형욱
Original Assignee
유영환
애드라닷컴 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 유영환, 애드라닷컴 주식회사 filed Critical 유영환
Priority to KR1020000013925A priority Critical patent/KR100349973B1/en
Publication of KR20000030817A publication Critical patent/KR20000030817A/en
Application granted granted Critical
Publication of KR100349973B1 publication Critical patent/KR100349973B1/en

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60GVEHICLE SUSPENSION ARRANGEMENTS
    • B60G7/00Pivoted suspension arms; Accessories thereof
    • B60G7/001Suspension arms, e.g. constructional features
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60GVEHICLE SUSPENSION ARRANGEMENTS
    • B60G2204/00Indexing codes related to suspensions per se or to auxiliary parts
    • B60G2204/10Mounting of suspension elements
    • B60G2204/15Mounting of subframes
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60GVEHICLE SUSPENSION ARRANGEMENTS
    • B60G2204/00Indexing codes related to suspensions per se or to auxiliary parts
    • B60G2204/40Auxiliary suspension parts; Adjustment of suspensions
    • B60G2204/43Fittings, brackets or knuckles
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60GVEHICLE SUSPENSION ARRANGEMENTS
    • B60G2206/00Indexing codes related to the manufacturing of suspensions: constructional features, the materials used, procedures or tools
    • B60G2206/01Constructional features of suspension elements, e.g. arms, dampers, springs
    • B60G2206/012Hollow or tubular elements
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60GVEHICLE SUSPENSION ARRANGEMENTS
    • B60G2206/00Indexing codes related to the manufacturing of suspensions: constructional features, the materials used, procedures or tools
    • B60G2206/01Constructional features of suspension elements, e.g. arms, dampers, springs
    • B60G2206/10Constructional features of arms
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60GVEHICLE SUSPENSION ARRANGEMENTS
    • B60G2206/00Indexing codes related to the manufacturing of suspensions: constructional features, the materials used, procedures or tools
    • B60G2206/01Constructional features of suspension elements, e.g. arms, dampers, springs
    • B60G2206/80Manufacturing procedures
    • B60G2206/81Shaping

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE: A servo component adapting view contents and real-time application for web page composition on the basis of MVC model is provided to make a CGI program by completely separating HTML files from Servlet program, a dispersed process by separating database from free presentation and overcome the degrade of performance due to the access of a plurality of users. CONSTITUTION: A package CMDHtml(com.addra) maintains and calls all functions of SQL processor(42) and HTML processor(41). The SQL processor generates and maintains a package connection pool for performing insertion, deletion, update, selection, etc. of all matters related to the database. The HTML processor processes parameters related to the functions for substituting table data with HTML content, processing of HTML files and Requests. In order to completely separate the HTML file contents from the corresponding language codes, the Servlet has only Java codes and the HTML is stored in the file system as template.

Description

엠브이씨 모델에 기반을 둔 웹 페이지 저작을 위한 뷰우 컨텐츠의 분리 및 실시간 적용 서버 콤포넌트{Server-side component for view contents separation and dynamic liking generation method for web-application development based on MVC model}Server-side component for view contents separation and dynamic liking generation method for web-application development based on MVC model}

본 발명은 HTML 문서내용과 해당 언어의 코드를 완벽하게 분리하여 씨지아이(CGI) 프로그램을 작성할 수 있도록 지원하는 콤포넌트(component)와 저작도구에 관한 것이다. 더욱 상세히는, 본 발명에서는 자바(Java)를 이용하여 자바의 씨지아이 인터페이스(CGI interface)인 서블릿 코드(servlet code)의 분리 방안을 연구하여 서블릿과 HTML을 분리 후 실시간으로 데이터베이스(database)를 포함한 각종 데이터와 템플릿(template ; ML)을 동적으로 연결하여 화면의 출력을 가능하게 한 저작도구에 관한 것이다.The present invention relates to a component and an authoring tool that allow a CGI program to be created by completely separating HTML document content and code of a corresponding language. More specifically, in the present invention, a method of separating servlet code, which is Java's CGI interface, is studied using Java, and after separating servlet and HTML, the database includes a database in real time. The present invention relates to an authoring tool capable of dynamically outputting a screen by dynamically connecting various data and a template (ML).

기존의 웹 프로그램 개발방식은 급변하는 사용자 요구사항을 부합하기에는 개발 방식 자체에 있어 많은 문제점을 가지고 있다. 본 발명은 사용자의 요구사항에 맞추어 빠른 개발을 지원하고 이후 요구사항의 변경이 발생할 때에도 적절하고 빠른 대응을 위한 웹 프로그램 개발과 관리를 위하여 제안되었다.The existing web program development method has many problems in the development method itself to meet the rapidly changing user requirements. The present invention has been proposed for the development and management of web programs to support rapid development in accordance with the user's requirements and to respond appropriately and promptly even when the requirements change later.

프로그램의 빠른 개발과 프로그램 소스의 단순화로 가독성을 높이고 단순 반복 작업들을 자동화하여 급변하는 시장에서 빠른 적용을 목표로 하고 있다.The rapid development of programs and the simplification of program sources aims to increase readability and to automate simple repetitive tasks for fast application in rapidly changing markets.

기존 월드와이드웹(WWW : world wide web) 프로그램 제작은 클라이언트에 보여질 화면 소스(source)인 ML(Markup Language, cf. HTML)의 문서내용과 각각의 해당 프로그래밍 언어(programming language ; perl, c, Java)를 이용하여 두 언어를 혼합한 형태로 씨지아이(CGI:Common Gateway Interface)를 작성해왔다. 이는 해당 언어에서 제공되는 인터페이스(interface)의 특성상 HTML(HyperText Markup Language)을 분리해 내기에는 많은 문제점과 변수들을 내포하고 있다.Existing world wide web (WWW) program production includes document content of ML (Markup Language, cf. HTML), which is the screen source to be displayed to clients, and the corresponding programming languages (perl, c, I have written CGI (Common Gateway Interface) using a mixture of both languages using Java. This has many problems and variables to separate HTML (HyperText Markup Language) due to the interface provided by the language.

이에 따른 형태의 작성법에서 가장 문제점으로 대두되는 부분은 디자이너의 디자인을 프로그래머가 소스에 삽입하므로 전체 소스 코드(source code)의 내용이 상당히 복잡하고 길어지며 이로 인하여 개발생산성의 저하 및 향후 유지보수 시에 발생되는 문제점(프로그램 버그 등)을 해결하는 데에 많은 시간과 노력이 소요되는 문제점을 안고 있었다.The most problematic part of this form of writing is that the design of the designer is inserted into the source by the programmer, so the contents of the entire source code are complicated and lengthy, which leads to a decrease in development productivity and future maintenance. I had a problem that took a lot of time and effort to solve a problem (program bug, etc.).

또한 동적인 웹사이트 구축을 위해서 CGI나 자바애플릿을 이용하고 있으나, CGI는 사용자의 증가에 따른 급속한 성능저하, 애플릿은 로딩속도의 지연에 따른 단점을 지니고 있다. 이러한 단점들을 극복하기 위해 서버측에서 구동되는 서블릿기술이 각광 받고 있으나 서블릿은 HTML문서와 업무로직이 결합되어 있어 프로그램 개발 생산성이 낮고 유지보수도 상당히 어려운 단점을 가지고 있다.In addition, CGI and Java applets are used to build a dynamic website. However, CGI has the disadvantage of rapid performance deterioration due to the increase of users, and applet due to the delay of loading speed. In order to overcome these shortcomings, the servlet technology running on the server side is in the spotlight, but the servlet has a disadvantage in that program development productivity is low and maintenance is difficult due to the combination of HTML documents and business logic.

HTML 문서내용과 프로그램 코드를 분리하기 위한 노력은 이전에도 지속적으로 연구되어 왔으며, 연구 결과로 인한 다양한 포멧이 발표됐고 현재 사용되고 있기도 하다. 가장 널리 알려진 포멧들은 ASP(Active Server Page), JSP(Java Server Page), JHTML(Java HTML) 인데, 이들 포멧의 공통적인 장점은 HTML 문서내용안에 프로그램 코드를 삽입하는 형태로 프로그램을 작성할 수 있도록 지원하여 가독성을 높이고자 하였다.Efforts to separate HTML document content from program code have been continually studied previously, and various formats have been published and are currently in use. The most popular formats are Active Server Pages (ASP), Java Server Pages (JSP), and Java HTML (JHTML). The common advantages of these formats are that you can write programs in the form of embedding program code into the HTML document content. To improve the readability.

그러나 이러한 포멧들을 사용함에 있어서 문제되는 부분은 일정 플랫폼(Paltform)에 구애를 받는다는 점이며 궁극적으로 HTML 문서내용과 프로그램 코드가 분리되어 있지 못하여 로직의 복잡성과 모듈화의 어려움을 계속 내재하고 있다.However, the problem with using these formats is that they are tied to a platform, and ultimately, the HTML document content and program code are not separated, and thus the complexity of the logic and the difficulty of modularization are inherent.

ASP(Active Server Page)의 경우에는 웹 서버를 반드시 마이크로소프트사의 IIS(Internet Information Server)를 사용해야 하며, JSP (Java Server Page)의 경우에는 JSDK2.1이상 이나 JSWDK1.0을 사용해야하며 JRUN을 사용할 경우 JRUN 2.3 이상에서 JSP Spec1.0을 지원한다. JHTML(자바 HTML)도 BEA사의 웹-로직 애플리케이션 서버(Web-Logic Application Server)를 사용해야만 구현을 할 수 있다. 즉, 특정 플렛폼(Platform)에 종속 된다는 단점을 가지고 있다.In the case of Active Server Page (ASP), the web server must use Microsoft's Internet Information Server (IIS). In the case of Java Server Page (JSP), JSDK2.1 or higher or JSWDK1.0 must be used. JRUN 2.3 or later supports JSP Spec1.0. JHTML (Java HTML) can also be implemented using BEA's Web-Logic Application Server. That is, it has a disadvantage of being dependent on a specific platform.

따라서 본 발명을 사용하여 서블릿 프로그램을 작성할 경우 같은 효과를 얻으면서 어떠한 플랫폼에도 종속되지 않는 프로그램을 만들 수 있다. 그 이유는 서블릿 작성시에 가장 기본적인 포멧인 JDK와 JSDK만을 사용하여 동일한 프로그램을 작성할 수 있기 때문이다.Therefore, when the servlet program is written using the present invention, it is possible to create a program that does not depend on any platform while obtaining the same effect. The reason is that the same program can be written using only the most basic formats, JDK and JSDK, when writing servlets.

본 발명을 통해 프로그램 개발자와 디자이너와의 분리작업이 용이해 졌으며 이에 따른 사후관리에서도 템플릿의 변형만으로도 소스의 재 컴파일(compile) 없이도 변경사항의 적용이 가능하게 한다.The present invention facilitates the separation work between the program developer and the designer. Accordingly, even after the maintenance, the modification can be applied to the template without recompiling the source only by changing the template.

본 발명은 종래의 서블릿의 단점을 극복하기 위해서 HTML문서와 서블릿 프로그램을 독립적으로 분리함으로써 웹 기반의 정보 시스템 구축 및 관리와 재사용이 용이하며, 프로그램코드의 이해가 휠씬 수월하여 유지보수비용을 현저히 낮출수 있는 효과도 동시에 거둘 수 있게 한 것이다. 또한 데이터베이스 연동과 프리젠테이션 및 업무로직을 분리하여 분산처리가 가능하게 하였고 다수 사용자 접근에 따른 성능저하도 극복하였다. 이러한 로직의 분리에 따라 향후 멀티티어(n-tier) 및 EJB 등을 쉽게 구성토록 하고 있다. 또한 이전에 소스 코드에서 다루어지던 문자, 날자, 시간, 숫자 등의 데이터 포맷(data format)도 템플릿에서 처리가 가능토록 하고 있다.In order to overcome the shortcomings of the conventional servlet, the present invention can easily separate the HTML document and the servlet program, thereby easily constructing, managing, and reusing the web-based information system, and greatly reducing the maintenance cost due to the easy understanding of the program code. It can also be achieved at the same time. In addition, distributed processing is possible by separating database linkage, presentation and work logic, and overcomes the performance degradation caused by multiple user access. This separation of logic makes it easy to configure n-tier and EJB in the future. The template also allows data formats such as characters, dates, times, and numbers, which were previously covered in the source code.

도 1은 기존의 서블릿 동작방식을 보여주는 개략도이다.1 is a schematic diagram illustrating a conventional servlet operation method.

도 2는 본 발명의 Addra-WebCom 구성개략도를 나타낸 것이다.Figure 2 shows a schematic diagram of the Addra-WebCom configuration of the present invention.

도 3는 본 발명의 Addra-WebCom 서블릿의 동작방식을 보여주는 개략도이다.3 is a schematic diagram showing the operation of the Addra-WebCom servlet of the present invention.

도 4는 본 발명의 콤포넌트 뷰우(component view)를 나타낸 것이다.4 shows a component view of the present invention.

도 5는 본 발명의 html 패키지 클래스(class) 다이아그램을 나타낸 도면이다.5 is a diagram illustrating an html package class diagram of the present invention.

도 6은 본 발명의 sql 패키지 클래스 다이아그램을 나타낸 도면이다.Figure 6 shows the sql package class diagram of the present invention.

도 7은 본 발명의 model 패키지 클래스 다이아그램을 나타낸 도면이다.7 is a diagram illustrating a model package class diagram of the present invention.

도 8은 본 발명의 디자인 개발도구의 작성화면이다.8 is a creation screen of the design development tool of the present invention.

도 9는 본 발명을 적용한 예이다.9 is an example to which the present invention is applied.

※ 도면 부호 설명※ Explanation of Drawings

10 : 브라우저 20 : 웹서버 30 : 서블릿 서버10: browser 20: web server 30: servlet server

40 : 서블릿 41 : HTML 프로세서 42 : SQL 프로세서40: Servlet 41: HTML Processor 42: SQL Processor

43 : 기본 서블릿(Base Servlet) 50 : RDB(Relational DateBase)43: Base Servlet 50: RDB (Relational DateBase)

60 : 파일 시스템(file system)60: file system

본 발명은 SQL 프로세서(42)와 HTML 프로세서(41)의 모든 기능을 관리/호출하는 클래스인 CMDHtml(com.addra)과 데이터베이스와 관련된 모든 사항을 삽입, 삭제, 수정, 선택 등을 처리하고, 데이터베이스 연동을 관리하는 연결풀(connection pool)의 생성 및 관리를 하는 패키지인 SQL 프로세서(42 : com.addra.sql) 및 HTML 문서 내용의 처리, 테이블 데이터를 HTML 내용으로 치환하는 기능 및 사용자 요청(User Request)에 관련된 파라미터(Parameter)를 처리하는 패키지인 HTML 프로세서(41 : com.addra.html)와 데이터베이스의 테이블의 내용을 받아 오브젝트로 구성하는 모델 (com.addra.model) 및 서블릿에 관련된 클래스를 제공하는 서블릿 패키지 (comm.addra.servlet), 유용하게 자주 사용되는 클래스를 모아둔 유틸 패키지 (com.addra.util)와 HTML의 각 요소를 오브젝트로 담고 있는 htmlElement 패키지(com.addra.html.htmlElement)로 구성되는 콤포넌트를 제공하며 템플릿 작성시에 데이터베이스를 참조하며 그 값을 가져다 화면상에서 구성시 WYSWYG(What you see is what you get)하게 제작할 수 있는 저작 도구를 제공하는 것이다.The present invention handles the insertion, deletion, modification, selection, etc. of CMDHtml (com.addra), which is a class that manages / calls all functions of the SQL processor 42 and the HTML processor 41, and all matters related to the database. SQL processor (42: com.addra.sql), a package that creates and manages a connection pool to manage interworking, processing HTML document contents, replacing table data with HTML contents, and user requests (User HTML processor (41: com.addra.html), a package that handles parameters related to the request, and a model (com.addra.model) and a class related to servlets that take the contents of tables in the database and construct them into objects. Servlet package (comm.addra.servlet) provided, utility package (com.addra.util) that collects useful frequently used classes, and htmlElement package (com.addr) that contains each element of HTML as an object. It provides a component composed of a.html.htmlElement) and provides authoring tool that can refer to database when creating template and get its value and make WYSWYG (What you see is what you get) when constructing on screen.

즉 이에 따라 본 발명은 HTML 문서내용과 해당 언어의 코드를 완벽하게 분리하기 위해 서블릿은 자바의 코드만을 갖고 있고, 이전방식에서 갖고 있던 HTML은 파일 시스템(File System)에 템플릿(template)으로 저장되며 서블릿에서 필요한 경우 HTML 프로세서(processor)에서 템플릿(template)을 서블릿에 전송(5,6)해주며, 이 템플릿에 데이터를 삽입해야 하는 경우, 기존의 데이터베이스 시스템 접근 방법을 자동화 하여 SQL 프로세서에서 기존의 반복적인 작업에서 벗어나 자동화된 기능으로 HTML 템플릿에 데이터베이스의 데이터를 템플릿으로 삽입(9,10)해준다.That is, according to the present invention, the servlet has only Java code in order to completely separate the HTML document contents and the code of the corresponding language, and the HTML that was used in the previous method is stored as a template in the file system. If required by the servlet, the HTML processor transfers the template to the servlet (5,6). If data needs to be inserted into this template, the existing database system approach can be automated to Away from repetitive tasks, the automated function inserts database data into templates as templates (9,10).

도 1은 기존의 서블릿 동작방식을 보여주고 있다. 웹을 통해 사용자가 브라우저(browser)를 이용하여 웹서버(web server)로 서비스 요청을 하면(1) 웹서버는 사용자에 요청에 따라 서블릿을 구동시키는 웹애플리케이션 서버(web application server)에 서비스 요청을 하며(2) 해당하는 서블릿이 데이터베이스 퀴어리(query) 및 연산(4)을 수행 후 결과를 되돌려주는(6,7,8) 방식을 취하고 있다. 이 경우 연산 및 데이터 조작에 관한 모든 프로그램 및 연산 수행 후 사용자에게 요청한 화면을 만들어 돌리게 되는데 이 때 해당화면(ML로 작성된)은 서블릿에 내재 되어있는 구조로 되어 있다. 이 경우 화면 소스와 비즈니스 로직(business logic)을 구성하는 소스가 혼합되어 개발 시점에서 개발자들이 많은 혼란을 야기 하게 된다. 또한, 애플리케이션(application)들의 유지 보수에도 많은 어려움을 갖고 있고, 데이터베이스의 조작은 필요한 시점에서 각각 새로이 작성해야 하는 불편함을 내재하고 있다.1 illustrates a conventional servlet operation method. When a user makes a service request to a web server using a browser (1) through a web, the web server sends a service request to a web application server that runs a servlet according to the request. And (2) the servlet performs a database query and operation (4) and returns a result (6, 7, or 8). In this case, after all programs and operations related to operation and data manipulation, the screen requested by the user is made and turned. At this time, the screen (written in ML) is inherent in the servlet. In this case, the mix of screen sources and the sources that make up the business logic creates a lot of confusion for developers at development time. In addition, there is a lot of difficulty in the maintenance of the application (application), and the operation of the database has the inherent inconvenience that each must be newly created when necessary.

도 1에서의 방법이 서블릿 제작에 있어 상이한 두 가지 언어(java, html)를 혼재해 사용함으로 제작에 어려움을 도출하였으며 또한 이후 유지 보수에도 불편으로 시간 및 비용상 불리함을 보여주었다.The method shown in FIG. 1 results in difficulty in production by using two different languages (java, html) mixed in servlet production, and also shows disadvantages in time and cost due to inconvenience in maintenance thereafter.

도 2는 본 발명의 Addra-WebCom 구성개략도를 나타낸 것으로, SQL 프로세서(42)와 HTML 프로세서(41)의 모든 기능을 관리/호출하는 클래스인 CMDHtml (com.addra)과 데이터베이스와 관련된 모든 사항을 삽입, 삭제, 업데이트, 선택등을 처리하는 패키지 연결 풀의 생성 및 관리하는 패키지인 SQL 프로세서(42 : com.addra.sql) 및 HTML 문서 내용의 처리, 테이블 데이터를 HTML 내용으로 치환하는 기능 및 사용자 요청(USER Request)에 관련된 파라미터(Parameter)를 처리하는 패키지인 HTML 프로세서(41 : com.addra.html)로 구성되는 콤포넌트를 나타내고 있다.FIG. 2 is a schematic diagram of the Addra-WebCom configuration of the present invention, in which all items related to the database and CMDHtml (com.addra), which manages / calls all functions of the SQL processor 42 and the HTML processor 41, are inserted. SQL processor (42: com.addra.sql), a package that creates and manages a package connection pool that handles the creation, deletion, updating, selection, etc., processing HTML document contents, substituting table data with HTML contents, and user requests The component which consists of HTML processor 41: com.addra.html which is a package which processes the parameter related to (USER Request) is shown.

도 3은 본 발명의 동작방식을 보여주고 있으며 서블릿은 자바의 코드만을 갖고 있다. 이전방식에서 갖고 있던 HTML은 파일 시스템(File System)에 템플릿(template)으로 저장되며 서블릿에서 필요한 경우 HTML 프로세서(processor)에서 템플릿(template)을 서블릿에 전송(5,6)해준다. 또한 이 템플릿에 데이터를 삽입 해야 되는 경우, 기존의 데이터베이스 시스템 접근 방법을 자동화 하여 SQL 프로세서에서 기존의 반복적인 작업에서 벗어나 자동화된 기능으로 HTML 템플릿에 데이터베이스의 데이터를 템플릿으로 삽입(9,10)해준다.Figure 3 shows the operation of the present invention and the servlet has only Java code. The HTML that was used in the previous method is stored as a template in the file system, and the HTML processor sends the template to the servlet (5, 6) if necessary in the servlet. If you need to insert data into this template, you can automate the existing database system approach to get away from repetitive tasks in the SQL processor and use the automated function to insert database data into an HTML template as a template (9,10). .

도 4는 본 발명의 패키지 구조를 나타내는 패키지 다이아그램(package diagram)이다. 모두 6개 패키지로 구분되며 기능적으로 HTML의 관리를 담당하는 html 패키지, 데이터베이스 입출력을 담당하는 sql 패키지 데이터 구조를 담당하는 model 패키지, html의 각 구성요소를 담당하는 htmlElement 패키지, 기능적인 부분을 담당하는 util 패키지와 서블릿을 지원하는 서블릿(servlet) 패키지로 구성된다.4 is a package diagram showing the package structure of the present invention. It is divided into six packages, and it is functionally html package that manages HTML, sql package that manages database I / O, model package that handles data structure, htmlElement package that takes care of each component of html, and functional part. It consists of a util package and a servlet package that supports servlets.

도 5 HTML을 담당하는 html 패키지의 설계서인 클래스 다이아그램(class diagram)이다.5 is a class diagram that is a design of an html package for HTML.

도 6은 데이터베이스를 담당하는 sql 패키지의 클래스 다이아그램이다.6 is a class diagram of an sql package in charge of a database.

도 7은 내부에서 사용되는 데이터인 model의 클래스 다이아 그램이다.7 is a class diagram of a model which is data used internally.

도 8은 저작도구를 사용한 템플릿 생성예로 데이터베이스를 HTML WYSIWYG editor인 템플릿 저작도구에서 연결하여 데이터 베이스에 있는 table을 가져와(도 8a)템플릿에 삽입(도 8b)하는 예이다.FIG. 8 illustrates an example of creating a template using an authoring tool, by connecting a database to a template authoring tool, which is an HTML WYSIWYG editor, and importing a table in the database (FIG. 8A) into a template (FIG. 8B).

도 9는 저작도구에서 만들어진 템플릿(도 9a)이 클라이언트인 웹브라우저에서 실행시켰을 때 만들어지는 화면예(도 9b)이다.9 is a screen example (FIG. 9B) created when the template (FIG. 9A) created by the authoring tool is executed in a web browser which is a client.

상기 방법으로 웹 프로그램이 구동 되면 제작 당시 프로그램 개발자와 화면 디자이너 간의 분업이 가능하며 이로인해 프로그램 소스의 간결화 및 명료화를 하여 가독성을 높일 수 있다. 또한 이후 화면 수정의 경우가 발생하여도 화면의 템플릿(template) 수정 만으로 소스의 재 컴파일이나 재 설치 없이 적용이 가능해져 유지보수에 많은 이점을 가져 올 수 있게 된다.When the web program is driven in the above manner, division of labor between the program developer and the screen designer at the time of production is possible, thereby improving readability by simplifying and clarifying the program source. In addition, even if the screen modification occurs later, only the template modification of the screen can be applied without recompilation or re-installation of the source, thereby bringing a lot of advantages in maintenance.

표 1은 본 발명의 서블릿을 이용 웹 애플리케이션(web application) 개발 인력배치를 종래의 방법과 본 발명의 방법을 비교하여 나타낸 표이다. 하기 표에서 본 발명에서는 각각 역할에 따라 인원을 배치 분리할 수 있다.Table 1 is a table showing a web application development personnel deployment using the servlet of the present invention in comparison with the conventional method. In the following table in the present invention can be arranged to separate the personnel according to their respective roles.

서블릿을 이용 웹 애플리케이션(web application) 개발에서 엠브이(MVC)에 기반을 둔 개발 팀 인원 구분Identifying team members based on MVC in developing web applications using servlets 구분division 뷰우(디자이너)View (designer) 콘트롤러(저작 개발자)Controller (author) 모델(콤포넌트 개발자)Model (Component Developer) 저작(웹 마스터)Authoring (Webmaster) 역할role 페이지 레이아웃Page layout 저작 플로우Authoring flow 비즈니스 로직Business logic 작동 환경Operating environment 기존사용Existing use HTML/서블릿/JSPHTML / Servlet / JSP 데이터베이스/웹서버/App.서버Database / Web Server / App.Server 본 발명 사용Use of the present invention HTML JSPHTML JSP 서블릿Servlet 애드라 웹콤Adra Webcom

표 1에서 볼 수 있듯이 애플리케이션(application) 개발에 있어서 기존의 사용으로는 역할을 분담하기가 어려워 대규모의 솔루션(solution)을 제작하는데 있어서도 중복된 작업을 개발자 마다 따로 반복하여 작업하는 경우도 많으며 기존의 방법은 MVC(model, view, control) 방법론에 입각한 프로그램을 제작하기에 어려움이 많으나 본 발명인 웹컴은 화면을 담당할 ML(view)과 개발자들이 개발할 자바 프로그램(java program; control), 그리고 서버에서 데이터 조작을 담당할 웹컴(model)으로 구분하여 작업하므로 작업 효율을 극대화 할 수 있다.As can be seen from Table 1, it is difficult to share the roles with existing uses in application development. Therefore, in the case of producing a large-scale solution, duplicate tasks are often repeated for each developer separately. The method is difficult to produce a program based on the MVC (model, view, control) methodology, but the present inventors Webcom has a ML (view) to handle the screen, a Java program (developers) to be developed by developers, and on the server Work can be maximized as it is divided into webcom (model) to handle data manipulation.

이하 본 발명의 콤포넌트의 기능상의 특징을 설명한다.Hereinafter, the functional features of the component of the present invention will be described.

1. HTML(Presentation)과 서블릿코드(Logic)의 분리1. Separation of HTML (Presentation) and Servlet Code (Logic)

콤포넌트 개발의 가장 큰 목적이면서, 가장 큰 장점으로 프로그램 코드의 작성 및 이해가 수월해지므로, 시스템 구축 시 개발생산성의 향상 및 향후 유지보수가 용이하다. HTML과 서블릿코드의 분리로 인하여 HTML 내용에 대한 수정은 별도의 컴파일(compile)이나 웹서버(webserver)의 재시동 없이도 적용이 가능하다.It is the biggest purpose of component development, and the biggest advantage is that it is easy to write and understand the program code, so it is easy to improve development productivity and maintain the future when constructing the system. Due to the separation of HTML and servlet code, modifications to HTML content can be applied without a separate compile or restart of the webserver.

2. 데이터베이스(DB)와 연동되는 다양한 콤포넌트의 제공2. Providing various components linked with database

HTML의 폼(Form) 태그에서 사용하는 기본 콘트롤(text, textarea, checkbox, radio, select 등)을 DB와 연동하여 입력포멧/출력포멧 지정 및 간단한(Data Validation Check)를 자동으로 가능하게 한다.Basic control (text, textarea, checkbox, radio, select, etc.) used in HTML form tag is interlocked with DB to enable input format / output format and simple (Data Validation Check) automatically.

3. (Visual Designer)를 이용한 신속한 개발3. Rapid development using (Visual Designer)

WYSIWYG(위지윅) HTML 에디터의 기능과 데이터베이스를 연동하여 템블릿 작성시에 애드라-웹컴과 연동할 수 있는 HTML 문서 템블릿을 신속하게 개발 하게 한다.WYSIWYG (Wizwick) HTML editor works with the database to create a template for creating HTML document templates that can be integrated with ADLA-Webcom.

4. 100% 순수 자바 기반으로 타 제품과 탁월한 연동성 보장4. 100% pure Java based ensures excellent interoperability with other products

100% 순수 자바로 개발되어 있어 서블릿 프로그램 작성시의 가장 기본적인 포멧인 JDK와 JSDK만을 사용하여 개발하는 프로젝트부터 기타 웹 애플리케이션 서버(Web Application Server) 등 자바를 지원하는 타제품과 손쉽게 연동하여 기능을 확장할 수 있다.It is developed in 100% pure Java, so it can be easily integrated with other products that support Java such as JDK and JSDK, which are the most basic formats when writing servlet programs, and other web application servers. Can be.

5. 다양한 템플릿 및 마법사 기능 제공5. Various template and wizard functions

단일입력폼, 마스터-디테일 입력폼 등 다양한 템플릿과 마법사 기능으로 초보자라도 쉽게 프로그램을 작성할 수 있다.Even beginners can easily write programs with various templates and wizard functions such as single input form and master-detail input form.

6. RDBMS와의 손쉬운 연동6. Easy connection with RDBMS

다양한 종류의 RDBMS (Oracle 7 / 8, Informix / Sybase / SQL-Server 등) 를 지원하도록 내부적으로 코드를 가지고 있으며, SQL 만 알고 있으면 데이터베이스(DB)관련 기능을 자동 처리하도록 지원한다.It has code internally to support various kinds of RDBMS (Oracle 7/8, Informix / Sybase / SQL-Server, etc.) and supports automatic processing of database (DB) related functions only if SQL is known.

7. 템플릿에 다양한 테이터 포맷(data format) 사용가능7. Can use various data formats in templates

템플릿에 출력할 테이터의 포맷을 주어 손쉽고 다양한 포맷의 데이터를 작성하게 해준다.The format of the data to be output to the template makes it easy to create data in various formats.

8. 유동적인 상수들에 대한 외부 참조8. External References to Floating Constants

소스코드에 고정적으로 들어가는 데이터 베이스의 정보, 영문/한글 변환문제 등을 소스코드에서 분리하여 외부에서 조절함으로써 소스의 변화없이 서버의 환경변수의 변화를 즉각적으로 대치할 수 있다.By changing database information and English / Korean conversion problem fixedly into the source code from the source code and adjusting it externally, it is possible to replace the change of the environment variables of the server without changing the source.

또한 본 발명의 사용 환경은 다음과 같다.In addition, the use environment of the present invention is as follows.

1. OS : 모든 플랫폼(자바가 지원되는)1. OS: all platforms (Java supported)

2. 웹 서버 : 웹 서버 + 서블릿 서버2. Web Server: Web Server + Servlet Server

3. Dev-Tools : 자바 JDK 1.1.6 이상 / JDSK 2.0 이상Dev-Tools: Java JDK 1.1.6 or later / JDSK 2.0 or later

4. 데이터베이스 : JDBC, JDBC-ODBC가 지원되는 모든 DBMS4. Database: All DBMSs that support JDBC, JDBC-ODBC

(Oracle 7.x (Or 8), Informix, Sybase, SQL Server 등)(Oracle 7.x (Or 8), Informix, Sybase, SQL Server, etc.)

5. 웹 브라우저 : Netscape, IE(Internet Explorer) 등5. Web browser: Netscape, IE (Internet Explorer), etc.

6. 클라이언트 사양 : 펜티엄 이상 권장 (OS 제한 없음)6. Client specification: Pentium or higher recommended (no OS limitation)

이하 실시예를 통하여 본 발명을 더욱 상세히 설명한다.The present invention will be described in more detail with reference to the following examples.

(실시예 1) 본 발명을 이용한 첫 번째 프로그램 작성Example 1 Writing the First Program Using the Present Invention

서블릿을 작성할 수 있는 기본환경을 구축한 상태임을 가정한다. 이미 언급한 HTML 문서내용과 서블릿 코드와의 분리가 어떤 형식으로 이루어지는가를 알아보기 위하여 간단한 예제 프로그램이다. 준비해야할 파일은 2가지이다. 즉, HTML 문서내용에 해당하는 .htm 또는 .html 파일과 서블릿 코드 부분에 해당하는 .java 파일이다(HelloWorld.htm, HelloWorld.java).Assume that you have built a basic environment for writing servlets. This is a simple example program to show how the separation between the HTML document content and the servlet code mentioned above is done. There are two files to prepare. That is, .htm or .html file for HTML document content and .java file for servlet code part (HelloWorld.htm, HelloWorld.java).

먼저 화면에 보여지는 부분인 HTML 파일을 아래와 같이 작성하고 최종 결과가 어떻게 나올지를 미리 만들어 본다.First, write the HTML file, the part shown on the screen, as follows, and make a preview of how the final result will look.

[HelloWorld.htm][HelloWorld.htm]

위의 HTML 코드에서 밑줄로 되어 있는 부분은 추후에 변수값으로 대치될 부분이다(Hello World!!, Addra-WebCom). 변수값에 대해서는 추후에 설명하도록 하겠다.The underlined part of the HTML code above is the part that will be replaced by the variable value later (Hello World !!, Addra-WebCom). Variable values will be explained later.

모든 프로그램 개발자들은 그들 자신만의 프로그램 제작 방식이 있으며 그 제작방식에 충실히 프로그램을 제작해 나간다. 여기서 언급하는 권장사항은 프로그램 개발자 여러분의 각각의 프로그램 제작 방식을 바꾸자는 것이 아니라 애드라-웹컴을 사용하여 프로그램을 작성할 경우 더 편리하고 빠르게 작성할 수 있는 방법을 제시해 주고자 함이 주 목적임을 알려둔다.Every program developer has their own way of making a program and sticks to it. The recommendation mentioned here is not to change the way each program developer writes, but to provide a more convenient and faster way to write a program using Adra-Webcom.

첫번째는 애드라-웹컴으로 서블릿 프로그램을 만들고자 할 경우에 항상 최종 결과화면을 먼저 만들라는 것이다.The first is that if you want to create a servlet program with Adura-Webcom, always make the final output screen first.

어차피 최종 결과는 HTML로 나올 것이며, 이것은 브라우저를 통해 화면에 보여지게 된다. 최종 결과를 먼저 확인함으로써 프로그램을 작성하는 데에 최종 도착점인 목표가 정해지게 되며, 내부적으로 어떻게 구현할지의 여부가 결정되게 된다.In any case, the end result will be in HTML, which will be displayed on the screen by the browser. By checking the final results first, the final goal of writing the program is set, and how it is implemented internally.

다음으로 변수값에 대하여 설명을 하겠다. 우선 위에서 작성한 HelloWorld.htm 파일을 수정하도록 하겠다.Next, the variable values will be explained. First, let's modify the HelloWorld.htm file created above.

[HelloWorld.htm][HelloWorld.htm]

최초 작성된 부분에서 Hello World!! 가 <%CONTENT%> 로 Addra-WebCom 이 <%NAME%> 으로 변동된 것을 볼 수 있다.Hello World !! You can see that Addra-WebCom changed to <% NAME%> with <% CONTENT%>.

이렇게 변경한 이유는 HTML문서상에서 <%변수%> 형태로 선언된 변수를 추후에 작성될 HelloWorld.java 에서 특정값으로 변환해주기 위함이다. Addra-WebCom을 사용하여 프로그램을 작성하면 HTML 문서상에 <%변수명%> 형태의 변수를 사용하게 된다.The reason for this change is to convert a variable declared as <% variable%> in the HTML document to a specific value in HelloWorld.java which will be created later. When you write a program using Addra-WebCom, you use variables of the form <% variable %%> in your HTML document.

이런 변수들은 추후에 서블릿 코드인 .Java 파일에서 파라미터 형태로 값을 지정하여 넘겨주면 애드라-웹컴에서 지정된 값을 읽어 들여 HTML 문서내 변수를 찾아 대치 시켜주게 된다. 변수는 데이터베이스의 테이블 칼럼(column)이 될 수도 있으며 위에서처럼 HTML내의 특정 부분이 될 수도 있다.These variables are later passed as parameters in the servlet code .Java file, which reads the values from ADLA-Webcom and replaces them in the HTML document. A variable can be a table column in a database or a specific part of HTML as above.

HTML 문서 부분은 완성이 되었고 서블릿 코드부분을 작성한다. 하기와 같이코딩한 후 HelloWorld.java로 저장한다. 컴파일하고 실행해보기 전에 코드의 내용은 다음과 같다.The HTML document part is complete and the servlet code part is written. Code as below and save as HelloWorld.java. Before compiling and running, the code looks like this:

01 : import javax.servlet.*;01: import javax.servlet. *;

02 : import javax.servlet.http.*;02: import javax.servlet.http. *;

03 : import com.addra.html.*;03: import com.addra.html. *;

04 : import java.io.*;04: import java.io. *;

01과 02는 서블릿 작성시에 기본적으로 임포트(import)해야 하는 내용이다.01 and 02 are basically things that need to be imported when writing servlets.

03은 애드라-웹컴의 3가지 패키지 중 com.addra.html 패키지를 임포트한 것으로 HelloWorld 프로그램에서는 데이터베이스에 관련된 내용이 없기 때문에 com.addra.sql package는 임포트 하지 않았다. 04의 java.io 패키지는 인쇄기록(PrintWriter)을 사용하기 위해 임포트한 내용이다.03 is the com.addra.html package of the three Adra-Webcom packages. Since the HelloWorld program has no database content, the com.addra.sql package is not imported. 04's java.io package is imported to use the PrintWriter.

06 : public class HelloWorld extends BaseServlet06: public class HelloWorld extends BaseServlet

클래스(Class) 선언부이다. 뒷부분에 extends BaseServlet이라고 되어있는 부분은 베이스서블릿(BaseServlet)을 확장하여 새로운 클래스를 만든다는 의미인데, 베이스서블릿(BaseServlet)은 HttpServlet에서 확장한 새로운 클래스로 애드라-웹컴 사용시에 기본적으로 확장하여 사용하는 클래스이다.Class declaration. In the latter part, extends BaseServlet means to create a new class by extending BaseServlet. BaseServlet is a new class that extends from HttpServlet. .

08 : String fileName;08: String fileName;

09 : AddraParameter params;09: AddraParameter params;

08 에서 사용된 String 형 변수 fileName은 추후에 서블릿에서 읽어들일 HTML 파일이 어떤 것인지를 지정하기 위한 변수이다. 여기서는 HelloWorld.htm이 될 것이다. 09 의 AddraParameter 형 변수 params는 HTML 문서내에서 정의한 변수들에 대한 값을 지정하여 넘기기 위한 클래스 형 변수이다. 선언은 com.addra.html 패키지에 선언되어 있으며 서블릿의 파라미터(HttpServletRequest, ServletRequest)를 해석하여 해시 테이블(hash table)로 저장하는 역할을 한다.The string variable fileName used in 08 is used to specify which HTML file to load in the servlet later. Here it will be HelloWorld.htm. AddraParameter type variable of 09 params is a class type variable for specifying and passing values for variables defined in HTML document. Declarations are declared in the com.addra.html package, which interprets servlet parameters (HttpServletRequest, ServletRequest) and stores them in a hash table.

11 : public void init(ServletConfig config) throws ServletException11: public void init (ServletConfig config) throws ServletException

12 : {12: {

13 : super.init(config);13: super.init (config);

14 : }14:}

11 부터 14 까지는 서블릿을 초기화(initial) 하는 부분이다.11 through 14 are the parts that initialize the servlet.

19 : fileName = fileDir + "HelloWorld.htm";19: fileName = fileDir + "HelloWorld.htm";

fileName에 HTML 문서를 지정하는 부분이다. 여기서 fileDir은 베이스서블릿(BaseServlet)에서 지정한다.Specify the HTML document for fileName. Where fileDir is specified in the BaseServlet.

21 : PrintWriter out =21: PrintWriter out =

new PrintWriter(newOutputStreamWriter(res.getOutputStream()));new PrintWriter (newOutputStreamWriter (res.getOutputStream ()));

22 : setHeader(res);22: setHeader (res);

21은 HTML 내용은 브라우저로 출력하기 위한 인쇄(PrintWriter)를 선언하고 초기화 하는 부분이며, 22번은 하이퍼HttpServletResponse 객체에 Content Type을 지정하는 부분이다.21 is the part that declares and initializes the print (PrintWriter) for outputting the HTML content to the browser, and 22 is the part that specifies the Content Type in the hyperHttpServletResponse object.

24 : params = cmd.getAddraPrameter(req);24: params = cmd.getAddraPrameter (req);

25 : params.put("CONTENT", "Hello World!!");25: params.put ("CONTENT", "Hello World !!");

26 : params.put("NAME", "Addra-WebCom");26: params.put ("NAME", "Addra-WebCom");

24 부터 26까지는 params 변수를 초기화하고, parameter 에 값을 지정하여 넘기는 과정이다. CONTENT 및 NAME은 HTML 문서상에 정의한 변수임을 알 수 있다. CONTENT와 NAME에 지정될 값은 여러분들이 원하는 값을 넣어도 무방하다.From 24 to 26, the params variable is initialized and the parameter is assigned a value. You can see that CONTENT and NAME are variables defined in the HTML document. You can enter whatever you want for CONTENT and NAME.

28 : out.println(cmd.showHtml(fileName, params));28: out.println (cmd.showHtml (fileName, params));

cmd는 CmdHtml Class를 의미하며 (BaseServlet에 선언되어 있다) showHtml Method를 통하여 HTML 문서와 paramater를 넘기면 HTML내의 변수와 지정된 변수 값을 읽어 들여 치환하게 된다.cmd stands for CmdHtml Class (declared in BaseServlet). Passing HTML document and paramater through showHtml Method will read and replace variables in HTML and specified variable value.

30 : out.flush();30: out.flush ();

31 : out.close();31: out.close ();

30과 31은 PrintWriter를 비우고, 닫는 부분이다.30 and 31 are the parts that empty and close the PrintWriter.

이제 HelloWorld.java를 컴파일하고 브라우저를 통하여 결과를 보도록 하자.Now let's compile HelloWorld.java and see the result in the browser.

프로그램은 Addra-WebCom을 사용하여 프로그램을 작성하였을 경우 HTML 문서내용과 Java Servlet Code와의 분리가 어떤 형식으로 이루어지는가를 보여준다. 이것은 지금은 간단한 프로그램이지만 프로그램의 규모가 커지고, 복잡해지기 시작하면 HTML 문서내용과 Java Servlet Code를 분리한 효과는 엄청하게 증가하게 된다.When the program is written using Addra-WebCom, the program shows how the separation between the HTML document contents and the Java Servlet Code is formed. This is a simple program now, but as the program grows in size and complexity, the effect of separating HTML document content from Java Servlet code will increase dramatically.

이하 본 발명의 실습을 위한 예를 들면 다음과 같다.For example for the practice of the present invention as follows.

프로그램에서 작성한 HelloWorld.htm 문서를 변경하여 저장해보도록 하자. 변수 부분을 제외한 나머지 부분(문서배경색, 글자색의 변경, 글꼴의 변경, 새로운 내용의 추가 등)을 수정 또는 추가한 후 저장을 한다.Let's change the HelloWorld.htm document we created in the program and save it. Save after modifying or adding the remaining parts except the variable part (document background color, text color change, font change, new content addition, etc.).

브라우저를 통해 해당 프로그램을 다시 호출했을 경우 어떠한 현상이 발생하는지를 알아보기 위함이다. 실제로 프로그램을 호출해보면 HTML 문서내용에 대한 수정과 추가에 대해서는 자바 서블릿 코드(Java Servlet Code)의 컴파일이나 웹서버의 재시동 없이도 바로 적용이 되는 것을 알 수 있을 것이다.This is to find out what happens when the program is called again through a browser. In fact, if you call the program, you can see that modification and addition of HTML document contents are applied immediately without compiling Java Servlet Code or restarting web server.

HTML 문서내용과 자바 서블릿 코드(Java Servlet Code)를 완벽하게 분리했기 때문에 이러한 것들이 가능하게되는 것이다.This is possible because of the complete separation between the HTML document content and the Java Servlet Code.

(실시예 2) 본 발명을 이용한 두 번째 프로그램 작성(Memo.java)Example 2 Writing a Second Program Using the Present Invention (Memo.java)

이번에는 데이터베이스(Database)와 연동하는 프로그램을 작성해보도록 하자.This time, let's write a program that works with Database.

DBMS는 어느 것을 사용하든지 가능하고, 설치방법에 준하여 addra.conf 파일에 설정이 모두 되어 있어야 프로그램이 가능하다.Any DBMS can be used, and the program can be done only if all settings are added in addra.conf file according to the installation method.

먼저 Database에 테이블을 하나 생성하자. 물론 각자의 DBMS에 맞게 테이블을 설정해야 한다. 참고로 여기서는 Microsoft SQL Server 7.0을 사용했다.First create a table in the database. Of course, you need to configure the table for your DBMS. For reference, we used Microsoft SQL Server 7.0.

테이블 명Table name T스케줄T schedule 칼럼 1Column 1 M-DateM-Date Char(8)Char (8) 칼럼 2Column 2 M-ContentM-Content Varchar(255)Varchar (255)

칼럼 1인 M_Date를 프라이머리 키(Primary Key)로 설정한다. 만들고자 하는 프로그램은 다음과 같은 기능을 수행하는 프로그램이다.Set column 1, M_Date, as the primary key. The program to make is a program that performs the following functions.

* 날짜별로 간단한 메모를 입력할 수 있다.* You can enter a simple memo by date.

* 날짜별로 저장된 메모를 조회할 수 있다.* You can search memo saved by date.

첫번째 프로그램처럼 먼저 HTML 문서내용을 작성하고 MemoEx.htm으로 저장한다.Like the first program, we first create the HTML document and save it as MemoEx.htm.

[MemoEx 최종결과 화면][MemoEx final result screen]

HTML 내용 중 밑줄 부분을 주의해서 살펴보기 바란다. 이 부분들은 기본적인 HTML 문서내용 이외에 기능 구현을 위해 추가되거나 수정된 부분들이다. 각각의 부분을 설명하면 아래와 같다.Pay close attention to the underscores in the HTML content. These parts have been added or modified to implement the functions in addition to the basic HTML document contents. Each part is described as follows.

function operSearch(form)function operSearch (form)

{{

form.OPER.value='SEARCH';form.OPER.value = 'SEARCH';

form.submit();form.submit ();

}}

function operInsert(form)function operInsert (form)

{{

form.OPER.value='INSERT';form.OPER.value = 'INSERT';

form.submit();form.submit ();

}}

이 부분은 자바스크립트의 함수인데, 조회 버튼과 입력 버튼을 눌렀을 경우 서블릿으로 넘길 파라미터를 지정하고 form을 실행시키는 함수이다.This part is a function of JavaScript. It is a function that executes a form and specifies parameters to be passed to the servlet when the query and input buttons are pressed.

<for mname="form" method="post" action="http://localhost/servlet/MemoEx"><for mname = "form" method = "post" action = "http: // localhost / servlet / MemoEx">

form의 action을 지정해주었다. 즉 자바스크립트 함수에서 form을 실행하면 form에서는 http://localhost/servlet/MemoEx 서블릿을 실행한다는 것을 지정한 것이다. 주의할 점은 action 값은 여러분의 설치환경에 따라 모두 다르다는 것이다. 정확한 서블릿 위치를 다시 지정하기 바란다.The action of the form is specified. In other words, if you execute the form in a JavaScript function, you specify that the form executes the http: // localhost / servlet / MemoEx servlet. Note that the action value depends on your installation. Please specify the correct servlet location.

<input type="hidden" name="OPER" value=""><input type = "hidden" name = "OPER" value = "">

자바스크립트에서 파라미터(OPER)를 지정할 경우 값이 지정될 부분이다.If you specify the parameter (OPER) in JavaScript, the value will be specified.

<input type="button" name="search" value="조회" onClick="operSearch(this.form)"><input type = "button" name = "search" value = "Query" onClick = "operSearch (this.form)">

조회 버튼을 눌렀을 경우 해당 자바스크립트를 호출하는 부분이다.When the Inquiry button is pressed, the relevant JavaScript is called.

<textarea name="content" rows="10" cols="53"><%M_CONTENT%></textarea><textarea name = "content" rows = "10" cols = "53"> <% M_CONTENT%> </ textarea>

조회를 실행할 경우 메모의 내용이 출력될 위치에 변수를 선언했다. 이 부분은 자바 서블릿 코드(Java Servlet Code)에서 데이터베이스(Database)에서 값을 읽어 들여 치환시켜 줄 것이다.When executing a query, the variable is declared where the contents of the memo will be displayed. This part will read the values from the database and replace them in the Java Servlet Code.

<input type="button" name="insert" value="입력" onClick="operInsert(this.form)"><input type = "button" name = "insert" value = "input" onClick = "operInsert (this.form)">

입력 버튼을 눌렀을 경우 해당 자바스크립트를 호출하는 부분이다.When the input button is pressed, the relevant JavaScript is called.

자 이제 HTML 문서내용을 완성하였으니 자바 서블릿 코드(Java Servlet Code)를 완성하자.Now that you have the HTML document content, let's complete the Java Servlet Code.

아래와 같이 작성하고 MemoEx.java로 저장하자.Write it as below and save it as MemoEx.java.

각각의 부분들을 살펴보도록 하자.Let's look at each part.

01 : import javax.servlet.*;01: import javax.servlet. *;

02 : import javax.servlet.http.*;02: import javax.servlet.http. *;

03 : import java.io.*;03: import java.io. *;

04 : import com.addra.sql.*;04: import com.addra.sql. *;

05 : import com.addra.html.*;05: import com.addra.html. *;

import 부분에서 첫번째 프로그램과 달라진 부분은 com.addra.sql package가 추가로 import 되었다. 두번째 프로그램에서는 데이터베이스를 다루기 때문이다.The first part of the import section is the com.addra.sql package. This is because the second program deals with databases.

07 : public class MemoEx extends BaseServlet07: public class MemoEx extends BaseServlet

MemoEx 클래스(Class) 선언부이다. 첫번째와 마찬가지로 기본 서블릿(Base Servlet)을 확장하여 사용했다.MemoEx Class declaration. Like the first one, we used an extension of the Base Servlet.

09 : String fileName;09: String fileName;

10 : AddraParameter params;10: AddraParameter params;

11 :11:

12 : String[] paramNames =new String[]{"M_CONTENT", "DATE"};12: String [] paramNames = new String [] {"M_CONTENT", "DATE"};

13 :13:

14 : public void init(ServletConfig config) throws ServletException14: public void init (ServletConfig config) throws ServletException

15 : {15: {

16 : super.init(config);16: super.init (config);

17 : }17:}

첫번째 프로그램에서 설명되었던 부분이다. HTML 문서를 지정할 변수 fileName, 파라미터 값을 지정할 params, request 에서 받아들일 파라미터명을 정의한 params Names (두번째 프로그램에서는 M_CONTENT와 DATE가 쓰인다), 서블릿을 초기화하는 init 함수이다.This is the part described in the first program. The variable fileName to specify the HTML document, params to specify the parameter value, params Names to define the parameter name to be accepted in request (M_CONTENT and DATE are used in the second program), and init function to initialize the servlet.

28 : if (req.getParameter("OPER") == null)28: if (req.getParameter ("OPER") == null)

29 : {29: {

30 : operStart(out);30: operStart (out);

31 : }31:}

32 : else32: else

33 : {33: {

34 : String strOper = req.getParameter("OPER");34: String strOper = req.getParameter ("OPER");

35 : String strDate = req.getParameter("year") +35: String strDate = req.getParameter ("year") +

req.getParameter("month") + req.getParameter("day");req.getParameter ("month") + req.getParameter ("day");

36 : params.put("DATE", strDate);36: params.put ("DATE", strDate);

37 :37:

38 : if (strOper.equals("INSERT"))38: if (strOper.equals ("INSERT"))

39 : {39: {

40 : params.put("M_CONTENT",40: params.put ("M_CONTENT",

req.getParameter("content"));req.getParameter ("content"));

41 : operInsert(out);41: operInsert (out);

42 : }42:}

43 : else if (strOper.equals("SEARCH"))43: else if (strOper.equals ("SEARCH"))

44 : {44: {

45 : operSearch(out);45: operSearch (out);

46 : }46:}

47 : }47:}

28부터 47의 내용은 최초 서블릿을 호출했을 경우에는 화면에 HTML 문서만을The contents of 28 through 47 only display the HTML document on the screen when the first servlet is called.

출력하면 되지만 그 후에는 사용자의 요청에 따라 조회 기능과 입력 기능을 분리하여 처리하기 위하여 작성되었다.It can be printed, but after that, it is written to handle the search function and input function separately according to the user's request.

if (req.getParameter("OPER") == null) 에서 보면 최초 서블릿이 호출될 경우에는 request에서 넘어오는 OPER 파라미터에 값이 없게 된다. 이것을 검사하여 HTML 문서내용만 출력하도록 작성한 것이다. Else 블록에서는 사용자가 조회 또는 입력을 한 경우이므로 모든 파라미터 값을 읽어 들이고, request 파라미터 중에서 OPER를 검사하여 조회일 경우와 입력일 경우를 나누어 처리하도록 작성한 것이다. request 파라미터 OPER는 HTML에서 자바스크립트 부분에서 값이 지정되어 넘겨진다. 각각의 블록에서 최종적으로 호출되는 함수는 operStart(), operSearch(), operInsert()이며 이 함수들의 상세정의는 아래에서 살펴보도록 하자.If (req.getParameter ("OPER") == null), the first time the servlet is called, the OPER parameter passed in the request has no value. It checks this and writes only the HTML document contents. In the Else block, it is the case that the user inquires or inputs, so it reads all parameter values and checks the OPER among the request parameters to process the case of the inquiry and the case of the input separately. The request parameter OPER is passed a value in the JavaScript part of the HTML. The final functions called in each block are operStart (), operSearch (), and operInsert (). The details of these functions are described below.

52 : public void operStart(PrintWriter out)52: public void operStart (PrintWriter out)

53 : {53: {

54 : out.println(cmd.showHtml(fileName, params));54: out.println (cmd.showHtml (fileName, params));

55 : }55:}

최초에 호출되는 operStart함수이다. 서블릿이 실행되면 먼저 HTML문서내용만 출력하면 되므로 showHtml 메소드를 호출할 때 fileName과 params만을 넘겨주었다.The operStart function called first. When the servlet is executed, only the contents of the HTML document are output first, so when the showHtml method is called, only fileName and params are passed.

57 : public void operSearch(PrintWriter out)57: public void operSearch (PrintWriter out)

58 : {58: {

59 : String query1 = "select M_Content from TSchedule "59: String query1 = "select M_Content from TSchedule"

60 : +" where M_Date = '"+params.get("DATE")+"'";60: + "where M_Date = '" + params.get ("DATE") + "'";

61 :61:

62 : out.println(cmd.showHtml(fileName, params, query1));62: out.println (cmd.showHtml (fileName, params, query1));

63 : }63:}

사용자가 조회를 선택했을 경우에 호출되는 operSearch 함수이다. 여기서는 showHtml 메소드에 데이터베이스에서 자료를 읽어들일 query 문자을 같이 넘겨 주었다. Query 문장을 넘겨주면 내부적으로 자료를 읽어 들여 HTML 문서내용에서 정의된 변수값으로 치환하는 기능을 수행한다.OperSearch function to be called when the user selects a query. In this case, the query character to read data from the database is passed to the showHtml method. When the Query statement is passed, the data is read internally and replaced with the variable value defined in the HTML document content.

여기서는 <%M_CONTENT%> 변수가 데이터베이스 값으로 치환 될 것이다.In this case, the variable <% M_CONTENT%> will be replaced with the database value.

65 : public void operInsert(PrintWriter out)65: public void operInsert (PrintWriter out)

66 : {66: {

67 : String query2 = toKSC("insert into TSchedule(M_Date, M_Content)"67: String query2 = toKSC ("insert into TSchedule (M_Date, M_Content)"

68 : +" values('" + params.get("DATE")+ "', '" +68: + "values ('" + params.get ("DATE") + "', '" +

params.get("M_CONTENT")+ "')");params.get ("M_CONTENT") + "')");

69 :69:

70 :70:

71 : int ii=cmd.updateDB(query2);71: int ii = cmd.updateDB (query2);

72 : if (ii==1)72: if (ii == 1)

73 : {73: {

74 : out.println("등록되었습니다.");74: out.println ("registered");

75 : }75:}

76 : else76: else

77 : {77: {

78 : out.println(query2);78: out.println (query2);

79 : out.println("sql Error.");79: out.println ("sql Error.");

80 : }80:}

81 : }81:}

사용자가 입력을 선택했을 경우에 호출되는 operInsert 함수이다. 실행시킬 query 문장을 지정하고 updateDB() 메소드에 query 문장을 넘겨주면 해당 query 문장을 실행시켜 query 문의 실행결과를 넘겨주게 된다.OperInsert called when the user selects an input. Specifying the query statement to execute and passing the query statement to the updateDB () method executes the query statement and passes the result of executing the query statement.

updateDB() 메소드는 세가지로 나뉘어지는데 위에서 사용한 일반 query 문장에 대한 실행과 PreparedStatement에 대한 처리 및 query 실행이 여러 번 가능하도록 query 문장을 String 배열로 입력 받아 처리할 수 있도록 지원한다.The updateDB () method is divided into three types. It supports the execution of the general query statement used above, processing of PreparedStatement, and query execution as a String array so that the query can be executed multiple times.

이상으로 Addra-WebCom으로 서블릿(Servlet) 프로그램을 작성하는 방법을 살펴보았다. 실시예이니 만큼 인터페이스의 화려함이 좀 떨어지거나 문제점(버그)이 있을 수 있다. 홈페이지에 가면 보다 많은 여러가지 다양한 예제를 다운로드 받을 수 있으니 연구해보면 다양한 프로그램을 작성할 수 있으리라 생각된다.So far, you have seen how to write servlet program with Addra-WebCom. As this is an embodiment, the glamor of the interface may be lowered or there may be a problem. If you go to the homepage, you can download many more various examples.

본 발명의 효과는 종래의 서블릿의 단점을 극복하기 위해서 HTML문서와 서블릿 프로그램을 독립적으로 분리함으로써 웹 기반의 정보 시스템 구축 및 관리와 재사용이 용이하며, 프로그램코드의 이해가 휠씬 수월하여 유지보수비용을 현저히 낮출수 있는 효과도 동시에 거둘 수 있게 한 것이다. 또한 데이터베이스 연동과 프리젠테이션을 분리하여 분산처리가 가능하게 하였고 다수 사용자 접근에 따른 성능저하도 극복하였다.In order to overcome the shortcomings of the conventional servlet, the effect of the present invention is to separate the HTML document and the servlet program independently so that the web-based information system can be easily constructed, managed, and reused, and the maintenance of the program code is much easier. Significantly lowering the effect is also possible. In addition, distributed processing is possible by separating database linkage and presentation, and also overcomes the performance degradation caused by multiple user access.

Claims (3)

SQL 프로세서(42)와 HTML 프로세서(41)의 모든 기능을 관리/호출하는 패키지인 CMDHtml(com.addra)과 데이터베이스와 관련된 모든 사항을 삽입, 삭제, 업데이트, 선택등을 처리하는 패키지 연결 풀의 생성 및 관리하는 패키지인 SQL 프로세서(42 : com.addra.sql) 및 HTML 문서 내용의 처리, 테이블 데이터를 HTML 내용으로 치환하는 기능 및 요청(Request)에 관련된 파라미터(Parameter)를 처리하는 패키지인 HTML 프로세서(41 : com.addra.html)로 구성되는 콤포넌트CMDHtml (com.addra), a package that manages / calls all functions of SQL processor 42 and HTML processor 41, and creates a package connection pool that handles inserting, deleting, updating, and selecting everything related to the database. And an HTML processor (42: com.addra.sql), which is a package to manage and processing HTML document contents, a function of replacing table data with HTML contents, and a parameter related to a request. Component consisting of (41: com.addra.html) 제 1항의 콤포넌트를 작동함에 있어서, HTML 문서내용과 해당 언어의 코드를 완벽하게 분리하기 위해 서블릿은 자바의 코드만을 갖고 있고, 이전방식에서 갖고 있던 HTML은 파일 시스템(File System)에 템플릿(template)으로 저장되며 서블릿에서 필요한 경우 HTML 프로세서(processor)에서 템플릿(template)을 서블릿에 전송(5,6)해주며, 이 템플릿에 데이터를 삽입 해야 되는 경우, 기존의 데이터베이스 시스템 접근 방법을 자동화 하여 SQL 프로세서에서 기존의 반복적인 작업에서 벗어나 자동화된 기능으로 HTML 템플릿에 데이터베이스의 데이터를 템플릿으로 삽입(9,10)함을 특징으로 하는 콤포넌트의 작동방법In operating the component of claim 1, in order to completely separate the HTML document contents and the code of the corresponding language, the servlet has only Java code, and the HTML used in the previous method is templated in the file system. If the servlet requires it, the HTML processor transfers the template to the servlet (5, 6), and if data needs to be inserted into the template, it automatically automates the existing database system approach to the SQL processor. How to operate a component, characterized by inserting database data as a template (9,10) into an HTML template with an automated function away from the repetitive tasks in 제 1항의 콤포넌트 작동을 위한 HTML 문서내용과 해당 언어의 코드를 완벽하게 분리하기 위해 서블릿은 자바의 코드만을 갖고 있고, 이전방식에서 갖고 있던 HTML은 파일 시스템(File System)에 템플릿(template)으로 저장되며 서블릿에서 필요한 경우 HTML 프로세서(processor)에서 템플릿(template)을 서블릿에 전송(5,6)해주며, 이 템플릿에 데이터를 삽입해야 하는 경우, 기존의 데이터베이스 시스템 접근 방법을 자동화하여 SQL 프로세서에서 기존의 반복적인 작업에서 벗어나 자동화된 기능으로 HTML 템플릿에 데이터베이스의 데이터를 템플릿으로 삽입(9,10)함을 특징으로 하는 콤포넌트 프로그램In order to completely separate the HTML document contents and the code of the language for the component operation of the claim 1, the servlet has only Java code, and the HTML used in the previous method is stored as a template in the file system. The HTML processor transfers the template to the servlet (5,6) if needed by the servlet, and if the data needs to be inserted into the template, the existing database system approach can be automated to Component program, characterized by inserting database data as a template (9,10) into an HTML template with an automated function away from the repetitive task of
KR1020000013925A 2000-03-20 2000-03-20 Server-side component for view contents separation and dynamic liking generation method for web-application development based on MVC model KR100349973B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020000013925A KR100349973B1 (en) 2000-03-20 2000-03-20 Server-side component for view contents separation and dynamic liking generation method for web-application development based on MVC model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020000013925A KR100349973B1 (en) 2000-03-20 2000-03-20 Server-side component for view contents separation and dynamic liking generation method for web-application development based on MVC model

Publications (2)

Publication Number Publication Date
KR20000030817A true KR20000030817A (en) 2000-06-05
KR100349973B1 KR100349973B1 (en) 2002-08-23

Family

ID=19656599

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020000013925A KR100349973B1 (en) 2000-03-20 2000-03-20 Server-side component for view contents separation and dynamic liking generation method for web-application development based on MVC model

Country Status (1)

Country Link
KR (1) KR100349973B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020022407A (en) * 2000-09-20 2002-03-27 주식회사 인포웨어 Method of generating a web site corporated with databases and program recording medium
KR101443879B1 (en) * 2012-09-26 2014-09-23 주식회사 참좋은넷 Method of processing web application framework
KR101552914B1 (en) * 2007-01-30 2015-10-01 에스케이커뮤니케이션즈 주식회사 Web server application framework web application processing method using the framework and computer readable medium processing the method
CN106156339A (en) * 2016-07-12 2016-11-23 泰康保险集团股份有限公司 Declaration form the management access method of system, Apparatus and system
CN109040307A (en) * 2018-09-11 2018-12-18 中国银行股份有限公司 A kind of self-cleaning method and device of communication connection

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101326985B1 (en) 2011-09-27 2013-11-14 이메디정보기술(주) Method and apparatus for developing, distributing and executing object-wise dynamic compileless programs

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020022407A (en) * 2000-09-20 2002-03-27 주식회사 인포웨어 Method of generating a web site corporated with databases and program recording medium
KR101552914B1 (en) * 2007-01-30 2015-10-01 에스케이커뮤니케이션즈 주식회사 Web server application framework web application processing method using the framework and computer readable medium processing the method
KR101443879B1 (en) * 2012-09-26 2014-09-23 주식회사 참좋은넷 Method of processing web application framework
CN106156339A (en) * 2016-07-12 2016-11-23 泰康保险集团股份有限公司 Declaration form the management access method of system, Apparatus and system
CN109040307A (en) * 2018-09-11 2018-12-18 中国银行股份有限公司 A kind of self-cleaning method and device of communication connection

Also Published As

Publication number Publication date
KR100349973B1 (en) 2002-08-23

Similar Documents

Publication Publication Date Title
US7165073B2 (en) Dynamic, hierarchical data exchange system
US6569207B1 (en) Converting schemas to component models
US7321918B2 (en) Server-side control objects for processing client-side user interface elements
US7007266B1 (en) Method and software system for modularizing software components for business transaction applications
US7047318B1 (en) Method and apparatus for creating and deploying web sites with dynamic content
US7873668B2 (en) Application data binding
US6854123B1 (en) Method, system, and program for mapping standard application program interfaces (APIs) to user interface APIs
US7233956B2 (en) Method and apparatus for data migration between databases
Hall et al. Core web programming
US20060015839A1 (en) Development of software systems
WO2003038658A2 (en) Dynamic workflow document generation
US20040181748A1 (en) Thin client framework deployment of spreadsheet applications in a web browser based environment
GB2359645A (en) Using scripts to generate style and content for XML documents
KR20060050608A (en) Data sharing system, method and software tool
KR100349973B1 (en) Server-side component for view contents separation and dynamic liking generation method for web-application development based on MVC model
US20070094289A1 (en) Dynamic, hierarchical data exchange system
MacDonald Beginning ASP. NET 3.5 VB in 2008: From Novice to Professional
Laine et al. XFormsDB: an extensible web application framework built upon declarative W3C standards
Liu Service-oriented tools for checking the identity of XML documents
Leff et al. Webrb: evaluating a visual domain-specific language for building relational web-applications
Sarrion Day 1: Mastering Component Writing with React
Paz Pro Telerik ASP. NET and Silverlight Controls: Master Telerik Controls for Advanced ASP. NET and Silverlight Projects
Tseng et al. XUIB: XML to user interface binding
Swarr Facelets
Wymer Upgrading the Web: A Model for Transitioning Web Applications to the Web 2.0 Service Oriented Architecture

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee