본문 바로가기
반응형

Programming95

EJB (Enterprise JavaBeans) 개요 EJB (Enterprise JavaBeans) 개요**EJB(Enterprise JavaBeans)**는 기업 환경에서 서버 측 애플리케이션을 개발하기 위한 컴포넌트 모델입니다. Sun Microsystems에 의해 제안된 이 모델은 비즈니스 로직과 시스템 서비스를 분리하여, 개발자가 복잡한 기술적 세부사항에 신경 쓰지 않고도 효율적으로 애플리케이션을 개발할 수 있도록 돕습니다 . EJB는 주로 다음과 같은 구성 요소로 이루어져 있습니다:Enterprise Bean: 비즈니스 로직을 구현한 서버 컴포넌트입니다. 세션 빈(Session Bean)과 엔티티 빈(Entity Bean)으로 나뉩니다.Container: EJB 서버와 Enterprise Bean 사이에서 클라이언트의 요청을 처리하고, 데이터베이.. 2024. 12. 11.
Delete All Files C# Examples (csharp-examples.net) Delete All Files (*.*) //Delete all files using System.IO; string[] filePaths = Directory.GetFiles(@"c:\MyDir\"); foreach (string filePath in filePaths) File.Delete(filePath); //Delete all files (one-row example) Array.ForEach(Directory.GetFiles(@"c:\MyDir\"), delegate(string path) { File.Delete(path); }); 2021. 6. 14.
OOP 설계의 기본 원칙 SOLID Single Responsibility Principle 단일 책임 원칙 Aclass should only have one reason to change Separation of concerns - different classes handling different, independent tasks/problems. Open/Closed Principle 개방/폐쇄 원칙 Classes should be open for extension but closed for modification Liskov Substition Principle 리스코프 치환원칙 You should be able to substitute a base type for a subtype Interface Segregation Princi.. 2019. 9. 15.
테스트 자동화 Benefits of automated Testing Test your code frequently, in less time Catch bugs before deploying Deploy with confidence Refactor with confidence Focus more on the quality Refactoring means chaging the structure of the code without changing its behavior. Types of tests Unit Test : Tests a unit of an application without its external dependencies. Cheap to write , Execute fast, Don't give a lot of.. 2019. 9. 13.
닷넷에서 오라클에 접근하는 7가지 방법 http://www.simpleisbest.net/archive/2005/08/15/203.aspx 펌 이 글은 오래된 전에 작성된 글입니다. 따라서 최신 버전의 기술에 알맞지 않거나 오류를 유발할 수 있습니다. 저자는 이 글에 대한 질문을 받지 않을 것입니다. 하지만 이 글이 리뉴얼 되면 이 글에 대한 질문을 하거나 토론을 할 수도 있습니다.현재 우리나라에서 가장 많이 사용되는 데이터베이스를 꼽으라면 오라클, MS SQL Server, DB2 정도를 꼽을 수 있을 겁니다. 닷넷 플랫폼에서 데이터베이스 사용 역시 오라클 혹은 MS SQL Server 가 가장 많이 사용되는 데이터베이스일 겁니다. 그래서 닷넷에서 오라클 데이터베이스에 연결하는 방법에 대해서 씨리즈를 작성해 보려고 합니다. 귀차니즘으로 인해.. 2017. 12. 8.
세션의 SET 옵션 확인하기 세션의 SET 옵션 확인하기 세션의 현재 SET 옵션에 대한 정보를 확인하려면 @@OPTIONS함수를 사용합니다. 제 PC에서 확인해보니 5496이라는 값이 나오는군요. 근데 5496이면 어떤 옵션이 설정되어 있을까요? MSDN에서는 NOCOUNT 옵션이 설정되어 있는지 확인하기 위해 다음과 같은 방법을 사용합니다. 123SET NOCOUNT ONIF @@OPTIONS & 512 > 0 RAISERROR ('Current user has SET NOCOUNT turned on.', 1, 1)NOCOUNT에 해당하는 구성 값이 512이므로 512로 비트 AND 연산을 합니다. 각 구성옵션에 해당 하는 값은 MSDN user options 서버 구성 옵션 구성 항목에서 확인할 수 있습니다. 보다 쉽게 옵션을.. 2017. 12. 8.
LinqToDataSet Helper // public static class DataSetHelper { private static bool IsNullableType(Type type) { return (type.IsGenericType && type.GetGenericTypeDefinition().Equals(typeof(Nullable))); } public static DataTable CreateDataTable(this IEnumerable query, string tableName) { DataTable table = new DataTable(tableName); var fields = typeof(T).GetProperties(); // Create columns foreach (var field in fields) { Da.. 2017. 9. 29.
ObjectDumper Class // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.IO; using System.Collections; using System.Collections.Generic; using System.Reflection; public class ObjectDumper { public static void Write(object o) { Write(o, 0); } public static void Write(object o, int depth) { Write(o, depth, Console.Out); } public static void Write(object o, int depth, TextWriter log).. 2017. 9. 23.
RSS Feed를 가져오는 C# 예제를 통한 Async 효율성 테스트 RSS Feed를 가져오는 C# 예제를 통한 Async 효율성 테스트 using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Net; using System.Net.Cache; using System.Text; using System.Threading.Tasks; using System.Xml.Linq; namespace FeedReader { class Program { static void Main(string[] args) { var feedUrls = new List() { "http://www.engadget.com/rss.xml", //"http://www.wi.. 2017. 4. 11.
Factory Method Pattern Factory Method Pattern 팩토리 메소드 패턴은 오브젝트 생성 방법 중에 하나로 인스턴스화할때 서브클래스에서 어떤 클래스를 인스턴스화 할지 결정한다. Client에서 IProduct를 멤버로 갖고 Creator 클래스를 통해 IProduct 멤버 생성을 위임함. 용도 : 유연성이 중요한 경우, 서브클래스에서 객체들이 확장되야 하는 경우, using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FactoryMethodPattern { // Factory Method Pattern Judith Bishop 2006 interf.. 2016. 10. 15.
Protorype Pattern 프로토타입 패턴은 저장된 프로토타입들 중 하나를 복제 하여 새로움 객체를 생성한다. 장점 : 크고 동적 로드 클래스의 빠른 인스턴스화가 가능 , 생성한 서브클래스를 몰라도 그들의 식별 정보를 유지 주의점 Clone 의 기능 구현 , Shallow Copy Deep Copy 차이, MemberwiseClone, Serialization 차이 구현 언어나 사용 라이브러리에 따라 Clone 기능 차이 있을수 있음. namespace PrototypePattern { [Serializable()] public abstract class IPrototype { // Shallow copy public T Clone() { return (T)MemberwiseClone(); } // Deep Copy public .. 2016. 10. 9.
우분투 (Ubuntu 16.04) 에 JAVA 설치 우분투 16.04 Ubuntu 16.04 에 JAVA 설치 sudo apt-get update sudo apt-get install default-jre sudo apt-get install default-j아 Oracle JDK 설치 sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java6-installer sudo apt-get install oracle-java7-installer sudo apt-get install oracle-java9-installer JAVA 관리 sudo update-alternatives --config java sudo update-alternativ.. 2016. 7. 31.
반응형