Web Development with Julia and Genie: A hands-on guide to high-performance server-side web development with the Julia programming language
- Length: 254 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-11-29
- ISBN-10: 180181113X
- ISBN-13: 9781801811132
- Sales Rank: #896384 (See Top 100 Books)
Get a practical overview of web development in Julia and learn how to build MVC applications with a REST API, and an interactive data dashboard using the Genie web framework
Key Features
- A tutorial on web development from Julia expert, Ivo Balbaert and the creator of the Genie framework, Adrian Salceanu
- A step-by-step approach to building a complete web app with the Genie framework
- Develop secure and fast web apps using server-side development on Julia
Book Description
Julia’s high-performance and scalability characteristics and its extensive number of packages for visualizing data make it an excellent fit for developing web apps, web services, and web dashboards. The two parts of this book provide complete coverage to build your skills in web development.
First, you’ll refresh your knowledge of the main concepts in Julia that will further be used in web development. Then, you’ll use Julia’s standard web packages and examine how the building blocks of the web such as TCP-IP, web sockets, HTTP protocol, and so on are implemented in Julia’s standard library. Each topic is discussed and developed into code that you can apply in new projects, from static websites to dashboards. You’ll also understand how to choose the right Julia framework for a project. The second part of the book talks about the Genie framework. You’ll learn how to build a traditional to do app following the MVC design pattern. Next, you’ll add a REST API to this project, including testing and documentation. Later, you’ll explore the various ways of deploying an app in production, including authentication functionality. Finally, you’ll work on an interactive data dashboard, making various chart types and filters.
By the end of this book, you’ll be able to build interactive web solutions on a large scale with a Julia-based web framework.
What you will learn
- Understand how to make a web server with HTTP.jl and work with JSON data over the web
- Discover how to build a static website with the Franklin framework
- Explore Julia web development frameworks and work with them
- Uncover the Julia infrastructure for development, testing, package management, and deployment
- Develop an MVC web app with the Genie framework
- Understand how to add a REST API to a web app
- Create an interactive data dashboard with charts and filters
- Test, document, and deploy maintainable web applications using Julia
Who this book is for
This book is for beginner to intermediate-level Julia programmers who want to enhance their skills in designing and developing large-scale web applications. The book helps you adopt Genie without any prior experience with the framework. Julia programming experience and a beginner-level understanding of web development concepts are required.
Web Development with Julia and Genie Foreword Contributors About the authors About the reviewers Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Get in touch Share your thoughts Share your thoughts Download a free PDF copy of this book Part 1: Developing Web Apps with Julia Chapter 1: Julia Programming Overview Technical requirements Working with Julia Using the REPL to use Julia interactively Using the package mode to jump-start a project Using Julia with the VS Code plugin Types, flow controls, and functions in Julia Types Flow controls Functions and methods Useful techniques in Julia web development Using Julia modules and packages Modules Packages and projects Parsing a CSV file How Julia works Why Julia is a good fit for web development Summary Further reading Chapter 2: Using Julia Standard Web Packages Technical requirements Making a TCP echo server with TCP-IP sockets The first version of an echo server A more sophisticated version of an echo server Using WebSockets Building HTTP client and server functionality Using HTTP as a web client Setting up a web server with HTTP Working with JSON data using a REST web server Using the JSON3 package Writing REST service endpoints for a ToDo app Testing the ToDo services in the REPL Testing the ToDo services with Postman Testing the ToDo services with curl Summary Further reading Chapter 3: Applying Julia in Various Use Cases on the Web Technical requirements Using Franklin to build static websites in Julia Using Julia with JavaScript JSExpr Blink WebIO Integration with NodeJS Building microservices with Julia Building dashboards with Julia Compiling Julia in WASM Using cloud services with Julia Deployment to cloud platforms Deployment to container platforms Choosing the right Julia framework for a project Genie Bukdu Interact Mux Merly Dance Summary Part 2: Using the Genie Rapid Web Development Framework Chapter 4: Building an MVC ToDo App Technical requirements Creating and configuring the app Pausing development Setting up the DB Creating our table Setting up the model Creating controllers and views Routing requests and rendering various pages Using a layout file View partials Adding validation Updating and deleting todos Enhancing our app with custom JavaScript and CSS Updating to-do items Deleting to-do items Aggregate values and filters Testing Genie apps Writing and running our first tests Configuring the test DB Adding Todo model unit tests Interacting with the DB Adding integration tests Summary Further reading Chapter 5: Adding a REST API Technical requirements Extending a web app with a REST API Preparing for a REST API Listing todos Adding pagination Creating todos Updating todos Deleting todos Retrieving todos Writing tests for a REST API Documenting our API with the Swagger UI Summary Further reading Chapter 6: Deploying Genie Apps in Production Technical requirements Genie app environments Customizing the environments Creating extra environments SearchLight database environments Changing the active environment Starting the application in production Containerizing Genie apps with Docker Setting up our GitHub repository for CI Deploying Genie apps with Git and Docker containers AWS EC2 hosting Installing and configuring Docker Cloning the GitHub repository Setting up the production database on AWS Preparing our production app to use the RDS database Improving application startup time using a custom sysimage Deploying our optimized app on Heroku Wrapping up the benefits of Docker Summary Chapter 7: Adding Authentication to Our App Technical requirements Adding and configuring the GenieAuthentication plugin Configuring the GenieAuthentication plugin Setting up the database Restricting access to the app Registering a new user Restricting access to the data Adding the user ID to the to-do items Modifying the Todo model Getting information about the authenticated user Filtering the to-dos by user ID Setting the user ID when creating a new to-do item Enhancing the validation rules Securing all the public-facing pages Securing the API Updating our tests Enabling basic authentication Genie hooks Setting up the authentication flow Creating the default test user Wrapping up the tests Summary Chapter 8: Developing Interactive Data Dashboards with Genie Technical requirements Augmenting data Generating random data Building our data dashboard Using Genie with low-code and reactive programming Designing the dashboard view Updating the dashboard view Adding the routes Adding the final touches Adding pagination to the to-do list Updating the to-do item creation Adding navigation Updating the to-do list Redirecting after login Summary Index Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share your thoughts Download a free PDF copy of this book
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Web Development with Julia and Genie: A hands-on guide to high-performance server-side web development with the Julia programming language
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.