SlideShare a Scribd company logo
1 of 124
Download to read offline
10 things I’d tell my younger self 
about 
younger 
(Java) Web Development
Confidential :)
Struts 1, Struts 2 or Spring MVC?
Struts 1, Struts 2 or Spring MVC? 
learning curve, available materials
Paradox of choice
“...increased choice may 
actually contribute to the 
recent epidemic of clinical 
depression affecting much of 
the Western world.”
1) Web Framework litmus test 
http://cdn8.triplepundit.com/wp-content/uploads/2010/08/litmus-test.jpg
Does it hide HTTP?
Does it hide HTTP? 
Yes 
Ignore
Does it hide HTTP? 
No 
Yes 
Maybe useful Ignore
Be of the Web, 
not just on the Web
request.toString()
org.apache.catalina.core.ApplicationHttpRequest@10e37618
Learn HTML, CSS, JS
2) Concurrency model
thread per request
non-blocking event loop
Click Callback 
Touch Callback 
Ajax Callback
Click Callback 
Touch Callback 
Ajax Callback 
Mouse Click Event
Click Callback 
Touch Callback 
Ajax Callback 
Data from server
Click Callback 
Touch Callback 
Ajax Callback 
DDDaataatat a f frfroromomm s seserervrvevererr
Everything except your code is executing in parallel 
http://kunkle.org/nodejs-explained-pres/#/title
which one?
lots of I/O operations
CPU heavy
3) Dependency Injection 
back to the roots
new project
DI/IoC container is 
optional
DI/IoC container is 
optional
“...if you use IoC containers, your code becomes, frankly, a 
lot harder to read”
when to use 
containers?
when to use 
containers? 
massive codebase
when to use 
containers? 
massive codebase injection points to a library
how I found my 
favorite container?
kobi story 
https://c2.staticflickr.com/4/3004/2706713453_4420661f8e_b.jpg
epiphany
http://assets.nydailynews.com/polopoly_fs/1.1106772!/img/httpImage/image.jpg_gen/derivatives/landscape_635/image.jpg 
wiring scope
request scope? 
application scope?
simplicity vs features
XML
annotations
David and Goliath
4) Web Servers 
the powerful and the strong are 
not always what they seem
Embedded web servers
dev-prod parity
startup times in ms 
JDK 
HttpServer 
simple 
framework 
embedded 
jetty
no free lunch
no free lunch 
admin 
consoles 
more 
memory automation
5) Template engines - 
less is more
logic/view separation
more features?
shape the path
logic-less templates
candidates
testable
6) logging 
the disciplined pursuit of less
http://12factor.net/
Treat logs like event streams
stdout and stderr
myapp >> /var/log/myapp.log
logrotate
myapp | logger
myapp | tee /var/log/myapp.log | logger
Unix Philosophy 
http://www.faqs.org/docs/artu/ch01s06.html
“Expect the output of 
every program 
to become the input to 
another, 
as yet unknown, 
program.”
7) Pragmatic Web 
Testing
8) Dependencies 
be careful who you invite 
to the party
classpath party
classpath party 
JAR JAR 
JAR JAR 
JAR JAR 
JAR 
JAR
classpath party 
JAR JAR 
JAR JAR 
JAR JAR 
JAR 
JAR 
JAR JAR 
JAR JAR 
JAR 
JAR 
JAR 
JAR JAR 
JAR
classpath party 
JAR JAR 
JAR JAR 
JAR JAR 
JAR 
JAR 
JAR JAR 
JAR JAR 
JAR 
JAR 
JAR 
JAR JAR 
JAR 
JAR JAR 
JAR JAR 
JAR 
JAR 
JAR JAR JAR
classpath party 
JAR JAR 
JAR JAR 
JAR JAR 
JAR 
JAR 
JAR JAR 
JAR JAR 
JAR 
JAR 
JAR 
JAR JAR 
JAR 
JAR JAR 
JAR JAR 
JAR 
JAR 
JAR JAR 
JAR
no transitive 
dependencies?
bring the pain forward
“When people don’t pay the 
true cost of something, they 
tend to consume it 
inefficiently” 
S.Levitt, S.Dubner
What’s under the hood?
what are your values 
and principles?
what are your values 
and principles? 
simplicity 
over 
familiarity
what are your values 
and principles? 
quick feedback 
over 
features 
simplicity 
over 
familiarity
what are your values 
and principles? 
quick feedback 
over 
features 
explicit code 
over 
annotations/xml 
simplicity 
over 
familiarity
what are your values 
and principles? 
quick feedback 
over 
features 
explicit code 
over 
annotations/xml 
simplicity 
over 
familiarity 
single purpose 
over 
full stack
what are your values 
and principles? 
quick feedback 
over 
features 
explicit code 
over 
annotations/xml 
single purpose 
over 
full stack 
go with the Web, 
not against it 
simplicity 
over 
familiarity
we’re all biased
it’s ok to start with 
familiar
9) steal like an artist
10) Think like a freak
bit.ly/Java_tips

More Related Content

Recently uploaded

Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024BookNet Canada
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Deliver Latency Free Customer Experience
Deliver Latency Free Customer ExperienceDeliver Latency Free Customer Experience
Deliver Latency Free Customer ExperienceOpsTree solutions
 
Women in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationWomen in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationDianaGray10
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023Joshua Flannery
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneUiPathCommunity
 
Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Memoori
 
Bitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactiveBitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactivestartupro
 
Tetracrom printing process for packaging with CMYK+
Tetracrom printing process for packaging with CMYK+Tetracrom printing process for packaging with CMYK+
Tetracrom printing process for packaging with CMYK+Antonio de Llamas
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
full stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdffull stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdfHulkTheDevil
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 

Recently uploaded (20)

Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Deliver Latency Free Customer Experience
Deliver Latency Free Customer ExperienceDeliver Latency Free Customer Experience
Deliver Latency Free Customer Experience
 
Women in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationWomen in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automation
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023
THE STATE OF STARTUP ECOSYSTEM - INDIA x JAPAN 2023
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyone
 
Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!
 
Bitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactiveBitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactive
 
Tetracrom printing process for packaging with CMYK+
Tetracrom printing process for packaging with CMYK+Tetracrom printing process for packaging with CMYK+
Tetracrom printing process for packaging with CMYK+
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
full stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdffull stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdf
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 

10 things I'd tell my younger self about Java Web Development