100 Things in 20 Minutes

To know my work on here is to know that I love a prompt. But more than that, I love a challenge. So when I saw this: And I kept seeing more and more of them pop up on my feed… I knew that I had to do…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Design for my HTTP Server

I recently started working on building an HTTP server using Java. I thought it might be a good idea to come up with a design, based on what I thought needed to happen in the program. This post outlines the initial designs I came up with, the approach I took to evolving the design, and some takeaways from the experience.

The first design I came up with is shown in the following diagram:

First design for HTTP server.

At this point I had a better idea of what a server does, as well as how to structure my program. I drew another diagram that I thought would better represent what my design should look like:

The flow I adopted was to select the next test to get to pass, decide what functionality I needed to add, and slowly add it to my application. Since I was following TDD, I would focus on writing small tests, getting them to pass, and refactoring when I was done. After finishing a feature, I would see if I could do a larger refactor to improve the structure of the code. For the most part, this worked out well, and I ended up with the design I have now.

When trying to draw out the design of the current state of my application, I tried following the same pattern as in the previous two diagrams, but ultimately it didn’t work. I believe using some sort of UML diagram might be more effective. For now, I will list out the classes that I have, along with short descriptions of what they do (and maybe write a follow up post with more detailed UML diagrams after my design has evolved further).

Classes:

Here are some of my main takeaways from trying to design most of my application from the get go, and from my experiences in slowly evolving it afterwards:

Overall it has been a great process seeing how classes have been added and removed, and I look forward to seeing what design I finally end up with.

Add a comment

Related posts:

Criptografia

Meios de criar a escuridão e caminhar dentro dela. “Criptografia” is published by Marcel Pires.

Understanding RNN

Human can start thinking on any of the topic but it is always based on the previous understanding about the topic. For example, if you are watching a movie and if you want to corelate each and every…

Kilkenny Draught Irish Beer Shirt

The Pop Star Harry Styles Christmas T shirt story reported below is NOT the “A Christmas Story” that is the best Christmas movie ever. The movie spoken of is DIE HARD a Bruce Willis shoot-em-up. The…