![]() These JavaScript files are the heart and soul of the single-page app. Instead, it contains a handful of placeholder elements, along with some links to JavaScript files. On its own, this HTML is generic and doesn’t represent anything specific about the web site. But the response from the server is just a bare bones HTML document with no real content. The web browser sends the initial request and still gets back some HTML. Every response back from the server is the full HTML document required to render a web page.Ī single-page app breaks this paradigm. You click a link, your web browser sends the request to the server, and the server sends back some HTML. The combination of the HTML, along with these other files, allows the web browser to render a meaningful web page for the user.Īnd thus the world turns. ![]() That HTML includes structured text along with links to other files such as images, CSS, JavaScript, etc. The server sends back some HTML to the web browser. A web browser (the client) sends a request for some page to a web host (the server). Web browsers work using a traditional client-server model. This is meant to be a high level overview and not a technical deep dive on any specific platform. Anatomy of a single-page applicationīefore diving into some of the issues I ran into, it’s worth breaking down the basic principles of a single-page app. I wanted to dive into some of the things I learned the hard way when I wrote my first single-page app, and hopefully help others who find themselves in the same boat. ![]() There are so many lessons to learn from both success and failures. Features that didn’t matter for a hobby application, but were vital to the long term success of a growing product.Įven though I ultimately ended up re-writing the application and it has continued to thrive, I think it’s important to reflect back on the early days of the project. Things like SEO, social sharing, and caching. It was a classic developer lament: I didn’t know what I didn’t know.Īnd what I came to realize is that my application was suffering in several key areas that were a direct result of the platforms I had chosen. For all the reasons I had chosen them, there were plenty of other reasons that might have made me think differently, had I known about them. ![]() When I say they were becoming a hindrance, what I really mean is that my lack of knowledge of the technologies had come back to bite me. I’d recommend them in heartbeat for the right project. I want to pause here and clarify: JHipster and Angular are not bad platforms. Ultimately, I decided to re-write most of it using frameworks that were more familiar to me. And after a few months, it became clear to me that my choice of technologies was becoming a hindrance to making the application better. I was learning some of the limitations that now felt like major roadblocks. I spent a lot of time looking up how to do new things that weren’t part of the boilerplate setup. However, the more I tried to improve it, the harder things got. And so I did what any other developer who is already stretched thin and trying to balance a full time job and a family and hobby projects would do: I spent my nights, weekends, and every free moment I had working on it. Knowing I had created something useful for a large audience was really satisfying. Other people started using the application. But a funny thing happened soon after I launched. Within a few weeks I had a functioning application that met all my needs. It’s been around for years, is very well documented, and has great community support. I settled on JHipster, a development platform for building web applications using modern technology: Angular, React or Vue for the client side, and Spring plus Gradle or Maven for the server side. The main goal was to get it working fast. My project was meant to be a hobby application that would only be used by me and a few friends, so I didn’t spend too much time thinking about a long term roadmap or requirements. ![]() But lately I have found myself wanting to branch out, and dabbling more in HTML and UI development.Ī couple of years ago, this natural curiosity led me to start a new side project. The so-called back-end of the software stack. As a Java developer, I have spent most of my professional life working on the parts of software systems that most people don’t see. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |