SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
.com




                    Kurumsal Java.com
Özcan Acar © 2009
Spring MVC
        Özcan Acar
       acar@unitedinter.net
   http://www.ozcanacar.com
  http://www.kurumsaljava.com



                                                    Kurumsal Java.com
                                                    Kurumsal Java.com
                                Özcan Acar © 2009
                                           © 2009
Özcan Acar Hakkında
public class OezcanAcar
{
     public static void main(String[] args)
     {
           Acar oezcan = new Acar();
           oezcan.setBirthday(quot;18.07.1974quot;);
           oezcan.setBirthplace(quot;Izmirquot;);
           oezcan.setJob(quot;Bilgisayar Mühendisiquot;);
          oezcan.setPassion(quot;Java EEquot;);
     }
}                                                     Kurumsal Java.com
                                                      Kurumsal Java.com
                                  Özcan Acar © 2009
                                             © 2009
Özcan Acar Hakkında




                                  Kurumsal Java.com
                                  Kurumsal Java.com
              Özcan Acar © 2009
                         © 2009
Java Tasarım Şablonları ve Yazılım Mimarileri
                     Tasarım şablonu nedir?
                     Interface / Abstract sınıf nedir?
                     Oluşturucu Tasarım Şablonları
                              Factory, Abstract Factory,
                              Builder, Prototype,
                     Singleton
                     Yapısal Tasarım Şablonları
                             Adapter, Bridge, Facade,
                     Decorator, Composite,    Flyweight,
                     Proxy
                     Davranışsal Tasarım Şablonları
                              Command, Memento,
                     Strategy, Iterator, State, Observer,
                     Visitor
                                                           Kurumsal Java.com
                                                           Kurumsal Java.com
                                       Özcan Acar © 2009
                                                  © 2009
Extreme Programming
        Çevik süreç nedir?
        Çevik manifesto
        Extreme Programming nedir?
        XP değerleri ve prensipleri
        Çevik proje planlaması
        Çevik süreçlerde iletişim
        Çevik tasarım
        Sürekli entegrasyon
        Test güdümlü yazılım
        Yazılım metrikleri



                                              Kurumsal Java.com
                                              Kurumsal Java.com
                          Özcan Acar © 2009
                                     © 2009
Sunumun İçeriği
MVC Tasarım Şablonu
Spring Framework
Spring Dependency Injection
Spring Annotations
Spring ile web programcılığı
Spring MVC
Spring MVC Demo


                                                   Kurumsal Java.com
                                                   Kurumsal Java.com
                               Özcan Acar © 2009
                                          © 2009
MVC Tasarım Şablonu
 Gelen                          İsteği
request                      yönlendirme
               Front                             Controller
             Controller             Model

Gönderilen
 response                                             Model
                 Model

                                                    nesnesini
                                                    oluşturma
                          HTML
                          çıktısı
             View


                                                                Kurumsal Java.com
                                                                Kurumsal Java.com
                                            Özcan Acar © 2009
                                                       © 2009
Spring Framework




                                Kurumsal Java.com
                                Kurumsal Java.com
            Özcan Acar © 2009
                       © 2009
Spring Framework




                                Kurumsal Java.com
                                Kurumsal Java.com
            Özcan Acar © 2009
                       © 2009
Spring Framework
XML konfigürasyonu
<bean id=quot;accountDaoquot;
    class=quot;com.kurumsaljava.demo.dao.AccountDaoImplquot;>
   <property name=quot;dataSourcequot; value=quot;datasourcequot; />
</bean>

<bean id=quot;dataSourcequot;
        class=quot;org.apache.commons.dbcp.BasicDataSourcequot;
                      destroy-method=quot;closequot;>
    <property name=quot;driverClassNamequot;
          value=quot;org.hsqldb.jdbcDriverquot; />
    <property name=quot;urlquot;
          value=quot;jdbc:hsqldb:hsql://localhost:9006/studentquot; />
    <property name=quot;usernamequot; value=quot;saquot; />
    <property name=quot;passwordquot; value=quot;quot; />
</bean>


                                                              Kurumsal Java.com
                                                              Kurumsal Java.com
                                          Özcan Acar © 2009
                                                     © 2009
Spring Annotation
@Component
     - Sinifin komponent oldugunu gösterir

@Controller
     - Spring MVC icinde controller siniflari icin kullanilir

@Repository
     - Spring MVC icinde controller siniflari icin kullanilir

@Service
     - Isletme katmanindaki facade siniflari icin kullanilir.

@Autowired
     - Bir bagimliligin otomatik enjekte edilmesini saglar.
                                                                   Kurumsal Java.com
                                                                   Kurumsal Java.com
                                               Özcan Acar © 2009
                                                          © 2009
Spring İle Web Programcılığı
    Spring MVC
    Spring Web Flow
    Spring Javascript
    Spring Faces
    Spring Portlet



                                            Kurumsal Java.com
                                            Kurumsal Java.com
                        Özcan Acar © 2009
                                   © 2009
Spring MVC
Spring framework‘ünün web modülü.
Spring IOC container ile entegre ve DI
kullanımı
Gösterim katmanı için JSP, Excel, PDF,
Freemarker, Velocity kullanılabilir
Test güdümlü çalışmayı mümkün kılar
Basit programlama modeli, ögrenimi kolay
Annotation kullanımı
Validation ve Data Binding framework
Tag Library                                          Kurumsal Java.com
                                                     Kurumsal Java.com
                                 Özcan Acar © 2009
                                            © 2009
Spring MVC
 Gelen                          İsteği
request                      yönlendirme
             Dispatcher                            Controller
              Servlet               Command

Gönderilen
 response                                               Model
                Command

                                                      nesnesini
                                                      oluşturma
                          HTML
                          çıktısı
             View


                                                                  Kurumsal Java.com
                                                                  Kurumsal Java.com
                                              Özcan Acar © 2009
                                                         © 2009
Spring MVC Annotation
@Controller
     - Spring MVC içinde controller sınıfları için kullanılır

@RequestMapping
     - Controller sınıfı metotları ile kullanıcı isteğini (request)
       ilişkilendirir

@RequestParam
     - Bir metot parametresini request içinde bulunan bir değere
       eşitler

@SessionAttributes
     - Controller sınıflarınca kullanılan session değerlerini
       belirler

                                                                     Kurumsal Java.com
                                                                     Kurumsal Java.com
                                                 Özcan Acar © 2009
                                                            © 2009
Spring MVC Örnegi




                                 Kurumsal Java.com
                                 Kurumsal Java.com
             Özcan Acar © 2009
                        © 2009
Spring MVC Örnegi

Kod örneği:

http://www.kurumsaljava.com/2009/03/23/yazilim-mimarisi-tasarimi-gunu-2/




                                                                     Kurumsal Java.com
                                                                     Kurumsal Java.com
                                                 Özcan Acar © 2009
                                                            © 2009

Mais conteúdo relacionado

Mais procurados

Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...Edureka!
 
Modular Web Applications with OSGi
Modular Web Applications with OSGiModular Web Applications with OSGi
Modular Web Applications with OSGiSam Brannen
 
Java on zSystems zOS
Java on zSystems zOSJava on zSystems zOS
Java on zSystems zOSTim Ellison
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structureodedns
 
Migrating Legacy Code
Migrating Legacy CodeMigrating Legacy Code
Migrating Legacy CodeSiddhi
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesMert Çalışkan
 

Mais procurados (8)

Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
 
NetWeaver Gateway- Extend the Reach of SAP Applications
NetWeaver Gateway- Extend the Reach of SAP ApplicationsNetWeaver Gateway- Extend the Reach of SAP Applications
NetWeaver Gateway- Extend the Reach of SAP Applications
 
Modular Web Applications with OSGi
Modular Web Applications with OSGiModular Web Applications with OSGi
Modular Web Applications with OSGi
 
Windows Azure Outline
Windows Azure OutlineWindows Azure Outline
Windows Azure Outline
 
Java on zSystems zOS
Java on zSystems zOSJava on zSystems zOS
Java on zSystems zOS
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structure
 
Migrating Legacy Code
Migrating Legacy CodeMigrating Legacy Code
Migrating Legacy Code
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 

Semelhante a Spring Mvc

Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892Tuna Tore
 
Spring online training
Spring online trainingSpring online training
Spring online training> Logics
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application serverRohit Kelapure
 
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...Edureka!
 
Spring MVC introduction HVA
Spring MVC introduction HVASpring MVC introduction HVA
Spring MVC introduction HVAPeter Maas
 
MarvelSoft SchoolAdmin Dev Framework
MarvelSoft SchoolAdmin Dev FrameworkMarvelSoft SchoolAdmin Dev Framework
MarvelSoft SchoolAdmin Dev FrameworkRanganath Shivaram
 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?NexSoftsys
 
Prem _Developer (1)
Prem _Developer (1)Prem _Developer (1)
Prem _Developer (1)Prem Anand T
 
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Vladimir Bacvanski, PhD
 
NIG 系統開發指引
NIG 系統開發指引NIG 系統開發指引
NIG 系統開發指引Guo Albert
 
Content-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on RailsContent-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on Railsbkraft
 
ASP.NET MVC, AngularJS CRUD for Azerbaijan Technical University
ASP.NET MVC, AngularJS CRUD for Azerbaijan Technical UniversityASP.NET MVC, AngularJS CRUD for Azerbaijan Technical University
ASP.NET MVC, AngularJS CRUD for Azerbaijan Technical UniversitySyed Shanu
 
SPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)Daniel Bryant
 
Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeJAXLondon2014
 

Semelhante a Spring Mvc (20)

Introducing spring
Introducing springIntroducing spring
Introducing spring
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892
 
Spring online training
Spring online trainingSpring online training
Spring online training
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application server
 
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
 
Spring MVC introduction HVA
Spring MVC introduction HVASpring MVC introduction HVA
Spring MVC introduction HVA
 
MarvelSoft SchoolAdmin Dev Framework
MarvelSoft SchoolAdmin Dev FrameworkMarvelSoft SchoolAdmin Dev Framework
MarvelSoft SchoolAdmin Dev Framework
 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?
 
Prem _Developer (1)
Prem _Developer (1)Prem _Developer (1)
Prem _Developer (1)
 
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
 
NIG 系統開發指引
NIG 系統開發指引NIG 系統開發指引
NIG 系統開發指引
 
Content-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on RailsContent-Driven Web Applications with Magnolia CMS and Ruby on Rails
Content-Driven Web Applications with Magnolia CMS and Ruby on Rails
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
ASP.NET MVC, AngularJS CRUD for Azerbaijan Technical University
ASP.NET MVC, AngularJS CRUD for Azerbaijan Technical UniversityASP.NET MVC, AngularJS CRUD for Azerbaijan Technical University
ASP.NET MVC, AngularJS CRUD for Azerbaijan Technical University
 
SPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA Java Case Study
SPEC INDIA Java Case Study
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
 
V fabric overview
V fabric overviewV fabric overview
V fabric overview
 
Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David Delabassee
 

Mais de Özcan Acar

AVR Microcontroller
AVR MicrocontrollerAVR Microcontroller
AVR MicrocontrollerÖzcan Acar
 
Courage For Change
Courage For ChangeCourage For Change
Courage For ChangeÖzcan Acar
 
BTSoru.com Tanıtım Slider
BTSoru.com Tanıtım SliderBTSoru.com Tanıtım Slider
BTSoru.com Tanıtım SliderÖzcan Acar
 
BizimAlem.com – Java İle Yüksek Performanslı Web Platformu
BizimAlem.com – Java İle Yüksek Performanslı Web Platformu BizimAlem.com – Java İle Yüksek Performanslı Web Platformu
BizimAlem.com – Java İle Yüksek Performanslı Web Platformu Özcan Acar
 
Bilge Programcı - Nasıl uzman yazılımcı olunur?
Bilge Programcı - Nasıl uzman yazılımcı olunur?Bilge Programcı - Nasıl uzman yazılımcı olunur?
Bilge Programcı - Nasıl uzman yazılımcı olunur?Özcan Acar
 
Test Güdümlü Yazılım
Test Güdümlü YazılımTest Güdümlü Yazılım
Test Güdümlü YazılımÖzcan Acar
 
Tasarim Prensipleri
Tasarim PrensipleriTasarim Prensipleri
Tasarim PrensipleriÖzcan Acar
 
Özcan Acar Ankara Cankaya Universitesi Wicket Webframework Sunumu
Özcan Acar  Ankara Cankaya Universitesi Wicket Webframework SunumuÖzcan Acar  Ankara Cankaya Universitesi Wicket Webframework Sunumu
Özcan Acar Ankara Cankaya Universitesi Wicket Webframework SunumuÖzcan Acar
 

Mais de Özcan Acar (8)

AVR Microcontroller
AVR MicrocontrollerAVR Microcontroller
AVR Microcontroller
 
Courage For Change
Courage For ChangeCourage For Change
Courage For Change
 
BTSoru.com Tanıtım Slider
BTSoru.com Tanıtım SliderBTSoru.com Tanıtım Slider
BTSoru.com Tanıtım Slider
 
BizimAlem.com – Java İle Yüksek Performanslı Web Platformu
BizimAlem.com – Java İle Yüksek Performanslı Web Platformu BizimAlem.com – Java İle Yüksek Performanslı Web Platformu
BizimAlem.com – Java İle Yüksek Performanslı Web Platformu
 
Bilge Programcı - Nasıl uzman yazılımcı olunur?
Bilge Programcı - Nasıl uzman yazılımcı olunur?Bilge Programcı - Nasıl uzman yazılımcı olunur?
Bilge Programcı - Nasıl uzman yazılımcı olunur?
 
Test Güdümlü Yazılım
Test Güdümlü YazılımTest Güdümlü Yazılım
Test Güdümlü Yazılım
 
Tasarim Prensipleri
Tasarim PrensipleriTasarim Prensipleri
Tasarim Prensipleri
 
Özcan Acar Ankara Cankaya Universitesi Wicket Webframework Sunumu
Özcan Acar  Ankara Cankaya Universitesi Wicket Webframework SunumuÖzcan Acar  Ankara Cankaya Universitesi Wicket Webframework Sunumu
Özcan Acar Ankara Cankaya Universitesi Wicket Webframework Sunumu
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Spring Mvc

  • 1. .com Kurumsal Java.com Özcan Acar © 2009
  • 2. Spring MVC Özcan Acar acar@unitedinter.net http://www.ozcanacar.com http://www.kurumsaljava.com Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 3. Özcan Acar Hakkında public class OezcanAcar { public static void main(String[] args) { Acar oezcan = new Acar(); oezcan.setBirthday(quot;18.07.1974quot;); oezcan.setBirthplace(quot;Izmirquot;); oezcan.setJob(quot;Bilgisayar Mühendisiquot;); oezcan.setPassion(quot;Java EEquot;); } } Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 4. Özcan Acar Hakkında Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 5. Java Tasarım Şablonları ve Yazılım Mimarileri Tasarım şablonu nedir? Interface / Abstract sınıf nedir? Oluşturucu Tasarım Şablonları Factory, Abstract Factory, Builder, Prototype, Singleton Yapısal Tasarım Şablonları Adapter, Bridge, Facade, Decorator, Composite, Flyweight, Proxy Davranışsal Tasarım Şablonları Command, Memento, Strategy, Iterator, State, Observer, Visitor Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 6. Extreme Programming Çevik süreç nedir? Çevik manifesto Extreme Programming nedir? XP değerleri ve prensipleri Çevik proje planlaması Çevik süreçlerde iletişim Çevik tasarım Sürekli entegrasyon Test güdümlü yazılım Yazılım metrikleri Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 7. Sunumun İçeriği MVC Tasarım Şablonu Spring Framework Spring Dependency Injection Spring Annotations Spring ile web programcılığı Spring MVC Spring MVC Demo Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 8. MVC Tasarım Şablonu Gelen İsteği request yönlendirme Front Controller Controller Model Gönderilen response Model Model nesnesini oluşturma HTML çıktısı View Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 9. Spring Framework Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 10. Spring Framework Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 11. Spring Framework XML konfigürasyonu <bean id=quot;accountDaoquot; class=quot;com.kurumsaljava.demo.dao.AccountDaoImplquot;> <property name=quot;dataSourcequot; value=quot;datasourcequot; /> </bean> <bean id=quot;dataSourcequot; class=quot;org.apache.commons.dbcp.BasicDataSourcequot; destroy-method=quot;closequot;> <property name=quot;driverClassNamequot; value=quot;org.hsqldb.jdbcDriverquot; /> <property name=quot;urlquot; value=quot;jdbc:hsqldb:hsql://localhost:9006/studentquot; /> <property name=quot;usernamequot; value=quot;saquot; /> <property name=quot;passwordquot; value=quot;quot; /> </bean> Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 12. Spring Annotation @Component - Sinifin komponent oldugunu gösterir @Controller - Spring MVC icinde controller siniflari icin kullanilir @Repository - Spring MVC icinde controller siniflari icin kullanilir @Service - Isletme katmanindaki facade siniflari icin kullanilir. @Autowired - Bir bagimliligin otomatik enjekte edilmesini saglar. Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 13. Spring İle Web Programcılığı Spring MVC Spring Web Flow Spring Javascript Spring Faces Spring Portlet Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 14. Spring MVC Spring framework‘ünün web modülü. Spring IOC container ile entegre ve DI kullanımı Gösterim katmanı için JSP, Excel, PDF, Freemarker, Velocity kullanılabilir Test güdümlü çalışmayı mümkün kılar Basit programlama modeli, ögrenimi kolay Annotation kullanımı Validation ve Data Binding framework Tag Library Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 15. Spring MVC Gelen İsteği request yönlendirme Dispatcher Controller Servlet Command Gönderilen response Model Command nesnesini oluşturma HTML çıktısı View Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 16. Spring MVC Annotation @Controller - Spring MVC içinde controller sınıfları için kullanılır @RequestMapping - Controller sınıfı metotları ile kullanıcı isteğini (request) ilişkilendirir @RequestParam - Bir metot parametresini request içinde bulunan bir değere eşitler @SessionAttributes - Controller sınıflarınca kullanılan session değerlerini belirler Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 17. Spring MVC Örnegi Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009
  • 18. Spring MVC Örnegi Kod örneği: http://www.kurumsaljava.com/2009/03/23/yazilim-mimarisi-tasarimi-gunu-2/ Kurumsal Java.com Kurumsal Java.com Özcan Acar © 2009 © 2009