달력

3

« 2024/3 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
2008. 3. 29. 09:11

Spring.Net에 관하여 공부하는 것/Spring Framework2008. 3. 29. 09:11

회사에서 나의 업무는 Java쪽에서 주로 일을 한다. 그런데, 이상스럽게도 요즘 내가 찾아보는 자료는 대부분이 .Net 관련 자료들이고 MS와 관련된 기술들이다.

사실, 일을 할때는 .Net이든 Java Side이건 가리지는 않는다. 양쪽 모두 발전하고 있는 기술들이고, 언제 고객의 요구가 변경될지도 모르기 때문에 항상 주지하고 지켜보고는 있지만, 요즘처럼 틈틈히 .Net쪽의 기술을 검토하고, 분석하지는 않았었다.

최근에 새로 프로젝트를 시작할 일이 있어서, 미국의 연구소와 같이 일을 하고 있는데, 그 쪽에서 .Net과 Java의 장단점에 대해서 나열 할 때도, 현실적으로 기존에 구현된 구현부는 Java이기에 .Net보다는 Java를 지지하기도 했었는데, 이상하게도 .Net 관련 기술에 빠져들고 있다.

아마도 기존의 MS는 폐쇠적익, 자기 기술에 대한 표준화에 대한 강한 의지 때문에 폐쇠적이고 자기 중심적인 면이 강했는데 반해, 요즘의 기술적 트렌드와 MS이외의 휼륭한 기술과 Framework을 받아들이는 적극적이고 긍정적인 면이 보기기 때문인것 같다. 기술적 관점에서 외적인 기술 트랜드에 대해 유연한 모습을 자주 보여주기 때문에 나의 관심도가 증가한 것 같다.

Spring의 DI(Dependoncy Injection)와  IoC(Inversion of Container)는 Java 쪽의 Spring Framework를 접해본 사람들은 흔히 듣는 익숙한 용어들이다. 그리고 Spring Framework의 Core 부분이다.
그런데, ASP.Net 3.5에서는 이에 대해 흔히 언급하고 있다. 그리고 DO와 IoC를 지원하다고 언급하고 있기에 나의 관심이 동했다.

Spring.Net은 스프링을 만든 SpringSource(Interface21에서 사명 변경)에서 지원하고 있다.
간략하게 설명하면, Spring Framework의 .Net 버전으로 생각하면 된다.  
따라서 Spring Framwork의 핵심적인 부분은 모두 반영이 되어있지만, .Net의 언어적인 측면을 따라서 만들어져 있다.

DI와 IoC는 스프링의 코어 부분이다. 이는 당연히 Spring.Core 모듈에 포함되어 있다.
Spring.Aop모듈은 스프링 철학의 핵심이라고 할 수 있는 모듈간의 Dependecy를 줄이기 위한 AOP(Aspect-Oriented Programming)을 지원한다. AOP는 한국에서는 상황 중심 프로그래밍으로 알려져 있는데, 웹 개발자라면 한번쯤은 관심을 가져볼만 하다. 아니 Architect를 꿈꾸는 사람이라고 하면, 반드시 접해보는 것이 바람직할 것 같다.
 
그리고, Database와 Data layer에 Access를 위해서 ADO.Net과 NHibernate를 사용하고 있다. 이부분은 Spring Framework과 많은 차이가 있을 것같다. 왜냐하면 ADO.Net도 나름대로 많은 장점이 있기 때문이다.

Spring.Web 모듈은 MVC를 제공하기 위한 기능들을 지원한다.  ASP.Net 3.5의 Extention 기능으로 MVC를 지원하기로 한것은 이미 잘 알려져 있다. 이는 스프링 MVC와는 많은 부분이 다른다. 마치 Rails와 유사하다.

자세한 내용은 아래에 Spring.Net의 링크를 이용하여 얻을 수 있다.
Spring.Net은 Spring Framework ver 2.5의 모든 기능을 지원하지는 않는다. 예를 들어 Spring Dynamic Module(Spring OSGi)는 아직 지원하지 않는다. 공식적으로 사용 가능한 Spring.Net은 ver 1.1이다.

Spring.Core – Use this module to configure your application using Dependency Injection.   

Spring.Aop – Use this module to perform Aspect-Oriented Programming (AOP).  AOP centralizes common functionality that can then be declaratively applied across your application in a targeted manner.   An aspect library provides predefined easy to use aspects for transactions, logging, performance monitoring, caching, method retry, and exception handling.

Spring.Data – Use this module to achieve greater efficiency and consistency in writing data access functionality in ADO.NET and to perform declarative transaction management.

Spring.Data.NHibernate – Use this module to integrate NHibernate with Spring’s declarative transaction management functionality allowing easy mixing of ADO.NET and NHibernate operations within the same transaction. NHibernate 1.0 users will benefit from ease of use APIs to perform data access operations.

Spring.Web – Use this module to raise the level of abstraction when writing ASP.NET web applications allowing you to effectively address common pain-points in ASP.NET such as data binding, validation, and ASP.NET page/control/module/provider configuration.

Spring.Web.Extensions – Use this module to easily expose a plain .NET object (PONO), that is one that doesn't have any attributes or special base classes, as a web service, configured via dependency injection, 'decorated' by applying AOP, and then exposed to client side java script.

Spring.Services – Use this module to adapt plain .NET objects so they can be used with a specific distributed communication technology, such as .NET Remoting, Enterprise Services, and ASMX Web Services.  These services can be configured via dependency injection and ‘decorated’ by applying AOP.

Spring.Testing.NUnit - Use this module to perform integration testing with NUnit.

Spring.Net 1.1이 나온지도 꽤 된것 같다. Spring Framework ver 2.5의 새로운 Picture가 반영된 버전은 언제 나올지 궁금하다.

마지막으로 Spring.Net에 대한 동영상 자료는 아래 링크를 참조하면 도움이 될것이다.
http://www.infoq.com/presentations/pollack-intro-spring


:
Posted by 행복상자