3. About Ngoc
• Came to Japan to study and work in 2001
• Studied electrical engineering at Takamatsu 高専 and
computer vision at Tsukuba 大学
• Worked at several software startups:
Murakumo (Kokolink), GNT, KAYAC, Mobilus
• Interests: web frameworks, distributed systems, realtime systems
• Have been writing some web frameworks since 2009
2 in Erlang, 1 in Scala, 1 in Java
• Open source:
https://github.com/ngocdaothanh
5. Discussion question
• Have you ever written a web app?
• What are your favorite web frameworks?
6. • My favorite: Ruby on Rails
• It's a beautiful
opinionated
convention over configuration
web framework
7. https://gettingreal.37signals.com/ch04_Make_Opinionated_Software.php
Some people argue software should be agnostic. They say it's arrogant for
developers to limit features or ignore feature requests. They say
software should always be as flexible as possible.
We think that's bullshit. The best software has a vision. The best software
takes sides. When someone uses software, they're not just looking for
features, they're looking for an approach. They're looking for a vision.
Decide what your vision is and run with it.
And remember, if they don't like your vision there are plenty of other
visions out there for people. Don't go chasing people you'll never make
happy.
12. • In my opinion,
Writing a framework is 10x harder than writing a
library,
Because:
- You need to know how to use and connect
many libraries
- You need to have much experience to have
your vision, to make your framework opinionated
• Writing a library ~ Playing a music instrument
Writing a framework ~ Conducting an orchestra
14. Discussion question
• How market your web framework?
How to let users know about and use it?
How to create a community around it?
16. Discussion question
• What happens behind the scene
from the time when you type URL in the browser
address bar and press ENTER
to the time the web page is displayed?
(Note: This is a Google interview question)
17. Discussion question
• What are the differences between
a command line program and
a web program?
• What are the similarities between them?
18. Discussion question
• What are the features that you think a web
framework should have? What are the things
that you think a web framework should do for
you?
• What is the most important part in a web
framework?
19. • In my opinion,
the most important part in a web framework is
the router.
21. Structure of
HTTP request and response
• Use curl and telnet to demo
22. Route
from request
to action
• Request method + path info
-> Router
-> Which action to dispatch the request to