1 / 36

TrustForm System [ 고급 교육 자료 ]

TrustForm System [ 고급 교육 자료 ]. 컴스퀘어 주식회사. Updated : 2003 년 7 월 23 일. 1. 서버 개발 2. 개발 방법론 3. 실습 1 ~ 2 4. Q&A. Index Of Contents. 1. 서버 개발. 1. 서버개발. 가 . 설치 프로그램 . 나 . 서버 접속 (WebLogic) 1) 소스 보기 (JSP) 2) 소스 보기 (ASP) 다 . 대량 그리드 라 . 자동 소스 생성. 1. 서버 개발.

garson
Download Presentation

TrustForm System [ 고급 교육 자료 ]

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

E N D

Presentation Transcript


  1. TrustForm System [고급 교육 자료] 컴스퀘어 주식회사 Updated : 2003년 7월 23일

  2. 1. 서버 개발 • 2. 개발 방법론 • 3. 실습1 ~ 2 • 4. Q&A Index Of Contents

  3. 1.서버개발 1. 서버개발 • 가. 설치 프로그램. • 나. 서버 접속(WebLogic) • 1) 소스 보기(JSP) • 2) 소스 보기(ASP) • 다. 대량 그리드 • 라. 자동 소스 생성

  4. 1.서버개발 가. 설치 프로그램

  5. 1.서버개발 가. 설치 프로그램(DB)

  6. 1.서버개발 나. 서버 접속 (WebLogic) 1) 실 습 가) Terminal 접속 - IP : ………. 나) WebLoic 접속 - User ID : edu1 ~ 10 - PassWord : - home : /usr/edu/edu1 ~ 10 다) JSP 파일 저장 - jsp파일을 만들고 /usr/edu/jsp 에 저장한다 ※ /usr/bea/user_projects/domains/mydomain/applications/MyTest Link 라) JSP 파일 구동 http://localhost:7001/MyTest/test.jsp

  7. 1.서버개발 나. 서버 접속 (WebLogic) 1) 실 습(소스보기) <%@ page contentType="text/xml; charset=EUC-KR" %> <%@ page import="java.sql.*,kr.co.comsquare.xFormsXmlLib.*,kr.co.comsquare.db.*, java.util.*, javax.naming.*" %> <% Connection conn = null; ResultSet rs = null; Statement stmt = null; xFormsConsXml formData = null; Context ctx = null; Hashtable ht = new Hashtable(); ht.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" ); ht.put( Context.PROVIDER_URL, "t3://localhost:7001" ); try { formData = new xFormsConsXml(); int root = xFormsConsXml.rootNodeID; String search = request.getParameter( "search" ); ctx = new InitialContext(ht); javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup( "MSSQLJDriverDataSource" );

  8. 1.서버개발 나. 서버 접속 (WebLogic) 1) 실 습(소스보기) conn = ds.getConnection(); stmt = conn.createStatement(); if(stmt == null) throw new SQLException("Statement Error"); stmt.execute( "SELECT * FROM employee" ); rs = stmt.getResultSet(); if(rs == null) throw new SQLException("ResultSet Error"); while(rs.next()) { int res = formData.add ( root, "res", "" ); formData.add( res, "emp_id", String.valueOf(rs.getString("emp_id")) ); formData.add( res, "fname", String.valueOf(rs.getString("fname")) ); formData.add( res, "minit", String.valueOf(rs.getString("minit")) ); formData.add( res, "lname", String.valueOf(rs.getString("lname")) ); formData.add( res, "job_id", String.valueOf(rs.getInt("job_id")) ); formData.add( res, "job_lvl", String.valueOf(rs.getInt("job_lvl")) ); formData.add( res, "pub_id", String.valueOf(rs.getString("pub_id")) ); formData.add( res, "hire_date", String.valueOf(rs.getTimestamp("hire_date")) ); } • add([parent_Node_Num], [Node_Name], [Data])

  9. 1.서버개발 나. 서버 접속 (WebLogic) 1) 실 습(소스보기) if(rs != null) try { rs.close(); rs = null; } catch(Exception e1) {} if(stmt != null) try { stmt.close(); stmt = null; } catch(Exception e1) {} if(conn != null) try { conn.close(); conn = null; } catch(Exception e1) {} } catch(NamingException e) { formData.setErrorMsg(true, true, "emp.java", e.getMessage()); } finally { if(rs != null) try { rs.close(); rs = null; } catch(Exception e1) {} if(stmt != null) try { stmt.close(); stmt = null; } catch(Exception e1) {} if(conn != null) try { conn.close(); conn = null; } catch(Exception e1) {} try {ctx.close();} catch (Exception e){} } %> <%=formData.getXmlString()%> <%! public void jspDestroy() { DBConnectionManager.getInstance().release(); super.destroy(); } %>

  10. 1.서버개발 나. 서버 접속 (WebLogic) 1) 실 습(소스보기 - ASP) <% On Error Resume Next Response.ContentType="text/xml" Response.Charset="euc-kr" Set formData = Server.CreateObject("XFormsAspUtil.XFormsConsXml") Set con = Server.CreateObject("ADODB.Connection") root = 0 strConnect = "PROVIDER=SQLOLEDB; SERVER=localhost; Initial Catalog=comsquare; User ID=user; Password=comsquare" con.Open(strConnect) If con.Errors.Count > 0 Then FOR Each err1 in con.Errors formData.setMessage (err1.Description) NEXT Else code = trim(Request("code")) condition = trim(Request("condition")) sear_key = trim(Request("key"))

  11. 1.서버개발 나. 서버 접속 (WebLogic) 1) 실 습(소스보기 - ASP) if code = "s" then if condition = "0" or condition = "" then sql = "SELECT * FROM Employees" else sql = "SELECT * FROM Employees where " & condition & " like " & sear_key end if Set rsCheck = con.Execute(sql) If con.Errors.Count > 0 Then FOR Each err1 in con.Errors Response.Write err1.Description NEXT Else if rsCheck.EOF = True then response2 = formData.Add(root, "response", "") end if ( response2, "Notes", rsCheck("Notes") ) rsCheck.MoveNext Loop End if

  12. 1.서버개발 나. 서버 접속 (WebLogic) 1) 실 습(소스보기 - ASP) Do While (rsCheck.EOF <> True) response2 = formData.Add ( root, "response", "" ) EmployeeID = formData.Add ( response2, "EmployeeID", rsCheck("EmployeeID") ) LastName = formData.Add ( response2, "LastName", rsCheck("LastName") ) TitleOfCourtesy = formData.Add ( response2, "TitleOfCourtesy", rsCheck("TitleOfCourtesy") ) Title = formData.Add ( response2, "Title", rsCheck("Title") ) Address = formData.Add ( response2, "Address", rsCheck("Address") ) HomePhone = formData.Add ( response2, "HomePhone", rsCheck("HomePhone") ) BirthDate = formData.Add ( response2, "BirthDate", rsCheck("BirthDate") ) Notes = formData.Add ( response2, "Notes", rsCheck("Notes") ) rsCheck.MoveNext Loop End if End if Response.Write formData.getXmlString Set formData = nothing Response.Flush Response.End %> • Add([parent_Node_Num], [Node_Name], [Data])

  13. 1.서버개발 다. 대량 그리드 1) 대량 그리드란? • Action을 이용한 값 넣기 • 대량 그리드 설정 일반 데이터 형식 - <my:res> <my:emp_id>PMA42628M</my:emp_id> <my:fname>Paolo</my:fname> <my:minit>M</my:minit> <my:lname>Accorti</my:lname> </my:res> - <my:res> <my:emp_id>PSA89086M</my:emp_id> <my:fname>Pedro</my:fname> <my:minit>S</my:minit> <my:lname>Afonso</my:lname> </my:res> 대량 그리드 형식 row_cnt▦control_num▦hidden_control_num ▦emp_id▦fname▦minit▦ lname▦ ▦PMA42628M▦Paolo▦M▦Accorti▩ ▦PSA89086M▦Pedro▦S▦Afonso▩ • Data ※반복되는 노드명을 제거하여 네트웤 트래픽을 줄인다

  14. 1.서버개발 다. 대량 그리드 2) 소스 보기 <model> <instance> <my:root xmlns:my="http://www.comsquare.co.kr/example" xmlns="http://www.comsquare.co.kr/example"> <my:search> <my:input1/> </my:search> <my:response> 2▦3▦0▦output1▦output2▦output3▦a11▦a12▦a13▩b11▦b12▦b13▩ </my:response> < /my:root> </instance> <bind id="bind1" ref="my:root/my:response/my:output1"/> <bind id="bind2" ref="my:root/my:response/my:output2"/> <bind id="bind3" ref="my:root/my:response/my:output3"/> </model>

  15. 1.서버개발 다. 대량 그리드 2) 소스 보기 <xhtml:body> <!-- <my:response>row_cnt▦control_num▦hidden_control_num▦output1▦output2▦output3▦a11▦a12▦a13▩b11▦b12▦b13▩</my:response> ▦ - col seperator ▩ - row seperator -> <repeat huge="yes" style="left:30px; top:50px; width:320px; height:170px; border-width:1px;" id="grid1" nodeset="my:root/my:response" type="grid" caption="Caption1^Caption2^Caption3" left="30" top="50" gridWidth="320" gridHeight="170" colWidth="100,100,100" rowHeight="20" dataHeight="20" fixedColor="#000000" fixedBkColor="#d4d0c8" gridColor="#000000" gridColorFixed="#000000" gridLines="2" gridLinesFixed="2"> <output id="output1" ref="my:output1" bind="bind1" style="left:30px; top:70px; width:100px; height:20px; vertical-align:middle; border-width:1px;"/> <output id="output2" ref="my:output2" bind="bind2" style="left:130px; top:70px; width:100px; height:20px; vertical-align:middle; border-width:1px;"/> <output id="output3" ref="my:output3" bind="bind3" style="left:230px; top:70px; width:100px; height:20px; vertical-align:middle; border-width:1px;"/> </repeat> </xhtml:body>

  16. 1.서버개발 다. 대량 그리드 3) 서버 소스 보기 <%@ page contentType="text/xml; charset=EUC-KR" %> <%@ page import="java.sql.*,kr.co.comsquare.xFormsXmlLib.*,kr.co.comsquare.db.*" %> <% Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; xFormsConsXml formData = null; Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); String url = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=comsquare"; String id = "user"; String pw = "comsquare"; try { conn = DriverManager.getConnection(url, id, pw); if(conn == null) throw new SQLException("Connection Error"); formData = new xFormsConsXml(); int root = xFormsConsXml.rootNodeID; String search = request.getParameter( "search" ); pstmt = con.prepareStatement("SELECT * FROM employee"); if(pstmt == null) throw new SQLException("Statement Error"); rs = pstmt.executeQuery(); if(rs == null) throw new SQLException("ResultSet Error");

  17. 1.서버개발 다. 대량 그리드 3) 서버 소스 보기 int row = 0; StringBuffer temp = new StringBuffer(); temp.append("▦8▦0▦"); temp.append( "emp_id" + "▦"); temp.append( "fname" + "▦"); temp.append( "minit" + "▦"); temp.append( "lname" + "▦"); temp.append( "job_id" + "▦"); temp.append( "job_lvl" + "▦"); temp.append( "pub_id" + "▦"); temp.append( "hire_date" + "▩"); while(rs.next()) { temp.append( String.valueOf(rs.getString("emp_id")) + "▦"); temp.append( String.valueOf(rs.getString("fname")) + "▦"); temp.append( String.valueOf(rs.getString("minit")) + "▦"); temp.append( String.valueOf(rs.getString("lname")) + "▦"); temp.append( String.valueOf(rs.getInt("job_id")) + "▦"); temp.append( String.valueOf(rs.getInt("job_lvl")) + "▦"); temp.append( String.valueOf(rs.getString("pub_id")) + "▦"); temp.append( String.valueOf(rs.getTimestamp("hire_date")) + "▩"); row++; } “▦“컬럼 구분자, “▩“열 구분자

  18. 1.서버개발 다. 대량 그리드 3) 서버 소스 보기 temp.insert(0, String.valueOf(row).toString()); formData.add( root, "res", temp.toString() ); if(rs != null) try { rs.close(); rs = null; } catch(Exception e1) {} if(pstmt != null) try { pstmt.close(); pstmt = null; } catch(Exception e1) {} } catch(Exception e) { formData.setErrorMsg(true, true, "emp_huge.java", e.getMessage()); } finally { if(rs != null) try { rs.close(); } catch(Exception e1) {} if(pstmt != null) try { pstmt.close(); } catch(Exception e1) {} if(con != null) manager.freeConnection("DBLogic", con); } %> <%=formData.getXmlString()%>

  19. 1.서버개발 다. 대량 그리드 3) 서버 소스 보기 <%=formData.getXmlString()%> “▦” : 컬럼 구분자 “▩”: 열 구분자 “▦” : 배열형으로 정의된 경우 구분자 (Combo, ListBox, CheckBox등) <%= formData.getXmlString() %> : 폼 데이타에 대량 데이타 Value가 저장된 XML을 넣어서 UI로 전달한다.

  20. 1.서버개발 라. 자동 소스 생성 • DB 설정 • Server 설정

  21. 1.서버개발 라. 자동 소스 생성 • Table Append • Instance 추가

  22. 1.서버개발 라. 자동 소스 생성 • SubmitInfo 추가 • SubmitInfo Dialog

  23. 1.서버개발 라. 자동 소스 생성 • 열기, 저장, 컴파일, 연결 설정 • Source Gen

  24. 2. 개발 방법론 2. 개발 방법론 • 가. 개발 Process • 나. 화면측 걔발 • 다. 화면 요건서 정의 • 라. I/O명세서

  25. 2. 개발 방법론 업무 분석 및 설계 • 시스템 구성도(H/W, S/W] • Client 화면의 정의 [샘플 참조] • I/O 명세서 • 화면요건정의서 개발자별 업무 분장 • 화면과 서버로 구분하여 개발자 배치 • 시스템 개발/운영 진행 방법론 - Communication 개발 진행 • 화면과 서버로 구분하여 개발자 배치 • 시스템 개발/운영 진행 방법론 - Communication 가. 개발 프로세서

  26. 2. 개발 방법론  UI Design  Instance Tree 생성 • 화면 User Interface Design • - Drawing, Property set, Pattern 등  Instance mapping • DBMS Schema Base • 화면과 서버간의 데이터 교환 명세  화면내 Logic 생성 • Drag & Drop 방식으로 화면의 control과 instance의 연결  서버와의 interface 적용 • WYSIWYG 방식 (Action, 연산 등) • VB Script, Java Script를 이용한 logic 구현  테스트 • 서버 모듈(서블릿, JSP 등)과의 연동 • SubmitInstance, Script를 이용 • DB transaction등 서버와의 연동 test • 화면내 로직의 test (Switch, Input Mode, Tab Order, Help 등) 나. 화면측 개발 상세 프로세서

  27. 2. 개발 방법론 [공통] 1) 금액은 오른쪽 정렬, 컴마 패턴주기 2) 날짜는 NNNN-NN-NN 패턴주기 , 정렬은 가운데 or 왼쪽->그쪽 룰에 따라 3) 모든 숫자 패턴은 오른쪽 정렬 4) 기본 입력모드는 한글, 특이 입력 모드만 정의 ====================================== [페이지 설명] 1) [신환등록] 버튼을 누르면 [등록완료] 버튼으로 변경되고 새로운 환자의 정보가 DB에 등록된다. 2) [진료대기자]버튼을 누르면 …의 기능이 실행되고 진료대기자 리스트의 한명을 클릭 하면 우측 리스트에 그 환자에 대한 데이터가 조회되어 나타난다. 3) [가족관리]-가족관리 페이지 팝업 4) [보험이력]-보험이력 페이지 팝업…… 10) [진료대기자],[검사대기자],[수납대기자]중 리스트에서 환자명을 더블클릭하면 우측 그리드와 하단 output filed에 데이터가 조회된다.-> 엑셀 I/O 명세서 참조 다. 화면요건 정의서

  28. 2. 개발 방법론 다. I/O 명세서 • DBMS Schema • 구현 화면별로 작성 • 화면요건정의서와 Pair • 서버와 client 개발자의 • commnunication tool • 개발 confirm tool • 상세 설명 • 1) I/O : Control type • 2) 속성 : Max Length, • Pattern, Input-Mode, • Align, Tab Order 등 • 3) 화면내 Logic(Data 사용 등) • 에 대한 기능 정의 • 4) 오픈시 조회, 조회, 등록, 업 • 데이트, 삭제 별루 I/O 명세 • 서 작성

  29. 3. 실습 1 가. DB를 접속해 조회, 수정, 삭제 하는 폼을 제작 하시오. Ex-3-1

  30. 3. 실습 1 가. DB를 접속해 조회, 수정, 삭제 하는 폼을 제작 하시오.(+Huge Grid) Ex-3-2

  31. 3. 실습 1 가. DB를 접속해 조회, 수정, 삭제 하는 폼을 제작 하시오. Ex-3-3

  32. 3. 실습 2 나. 데이터 연동과 여러 개의 뷰를 사용하여 아래와 같은 폼을 제작하시오 • 메뉴 • TFViewer1 • Toggle Control • TFViewer2

  33. 3. 실습 2 나. 데이터 연동과 여러 개의 뷰를 사용하여 아래와 같은 폼을 제작하시오 Data 연동

  34. 3. 기타 • Homepage • 컴스퀘어 : http://www.comsquare.co.kr • Support : http://www.Trustform.co.kr • Support : http://www.Trustform.com • Reference (컴스퀘어 홈페이지 참조) • 국민은행 채권관리 시스템 • XML/EDI 의료 ASP 시스템 • 참고자료 • Q&A : http://www.comsquare.co.kr/trustform/support.htm • 데모 : http://www.Trustform.co.kr/sample/index.html • 클래스 라이브러리 : http://www.comsquare.co.kr/trustform/api/index.html • 트라이얼 다운로드 : http://www.comsquare.co.kr/trustform/download.htm

  35. 4.Q & A Q & A

  36. Thanks You

More Related