Spring
Upcoming SlideShare
Loading in...5
×
 

Spring

on

  • 852 views

Alex a ne-a prezentat Spring la Geek Meet #6 Timişoara. Spring este o platformă de dezvoltare croită pentru proiecte Java, iar despre avantajele ce le oferă puteţi afla mai multe din prezentare, ...

Alex a ne-a prezentat Spring la Geek Meet #6 Timişoara. Spring este o platformă de dezvoltare croită pentru proiecte Java, iar despre avantajele ce le oferă puteţi afla mai multe din prezentare, asta dacă nu aţi ajuns la Geek Meet :)

Statistics

Views

Total Views
852
Slideshare-icon Views on SlideShare
784
Embed Views
68

Actions

Likes
0
Downloads
7
Comments
0

1 Embed 68

http://geekmeet.ro 68

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Spring Spring Presentation Transcript

    • Spring
    • Spring? • Inversion of control • Dependency Injection
    • • DEPENDENCY INJECTION Atunci cand : • public Car buildCar() { Car car = new Car(); Engine engine = new Engine(); car.setEngine(engine); return car; } - Scriem cod ca asta si vrem sa-i impresionam pe altii;
    • • INVERSION OF CONTROL Atunci cand : • public Car buildCar() { Car car = new Car(); Engine engine = new Engine(); car.setEngine(engine); return car; } … si chestia de mai sus, o face Springu’
    • • Cool stuff: – Roo - roo generate controller ;) – Easy configuration with xml; – Templates for Hibernate DAO; – AOP features: aspects, advices, pointcuts ☺ – Easy to configure a project with it: – Standard set of libraries; – Many examples; – Good documentation and many books; – Its so full of patterns! ☺
    • Container Configuration • Dependency Injection <bean id=“myCar" class=“gm.Ford"> <property name=“engine" ref=“renaultEngine" /> </bean> <bean id=“renaultEngine" class=“renault.engines.RenaultEngine“/> • Inversion of control myCar = context.getBean(“myCar”); • Service locator Is what spring is using for retrieving the objects from its container;
    • Fast configuration • Autowiring <bean id="sequenceGenerator“ class="SequenceGenerator” autowire="byType"> </bean> <bean id="datePrefixGenerator” class="DatePrefixGenerator"> class SequenceGenerator { public SequenceGenerator(DatePrefixGenerator generator) {…} } • Scan package <context:component-scan base-package=“org.mypackage"/>
    • …bean creation • Prototype (instance/request) • Singleton (instance/IOC container) • Session/Request (instance/session/request) • Proxying: • Necessary for AOP (see proxy pattern)
    • Aspects • Advice • Ex: logging before and after • Pointcut • Ex: account.putMoney() • Aspect – Advice + Pointcut: Log(“[Enter]putMoney”) Account.putMoney(); Log(“[Exit]putMoney”)
    • Externalized configuration • @Controller • @RequestMapping • @Aspect • @Autowired
    • QA? http://alexsisu.posterous.com/ alexandru.sisu@gmail.com
    • Resources • http://www.springsource.org/ • http://www.springbyexample.org • http://www.springsource.org/roo