
Learn Deno development with Oak and MongoDB, building a full-stack app from a basic server to a server-rendered to-do app and a REST API for products with CRUD.
Explore Deno features, including JavaScript support and native TypeScript integration. Learn how secure by default permissions control reading and writing files.
Evaluate node's flaws and ecosystem against deno's newer features, and explore a coexistence that offers early adopter opportunities.
Explore the similarities and differences between Deno and Node, learn how to transfer knowledge between them, and revisit a practical comparison after building a Deno app.
Install deno using the recommended instructions on your system, run a simple program in the terminal to verify, and explore deno's interactive environment.
Create your first Deno HTTP server to handle requests and return responses on port 8000. Learn with Visual Studio Code and Deno's HTTP server module, demonstrating a simple request-response cycle.
Learn how to grant explicit permissions when running Deno scripts, such as network, filesystem access, and environment variables, by using the --allow flags and exploring common permission types.
learn to respond with html by building proper html structure with head and body, include meta data and headers, and serve home, about, contact pages with 404 handling.
Install the Visual Studio Code extension for Deno, then search for the Deno extension and enjoy improved development experience with code suggestions.
Install Deno, build your first server, and explore the client–server request–response cycle; learn to handle text and HTML responses and leverage a middleware framework for web apps.
Learn Deno development with Oak, a middleware framework for building web apps using routing and dynamic HTML views, and set up a basic app with request context.
Explore multiple middleware functions in Deno development, with one extracting data from requests and another preparing the response. Chain middleware with next to forward requests; skipping next can cause errors.
Install Denon to automatically detect code changes and restart the server, eliminating manual restarts. Run Denon in the terminal to streamline Deno development.
Learn to handle requests with the Oak router in Deno development. Register routes for get, post, put, and delete and respond with context and middleware.
Define specific routes and route handlers, refactor a big request handler into modular handlers for maintainable development, and apply middleware with third-party modules and templating engines next chapter.
Learn to use the EJS templating engine in Deno, render templates to string from a template path with a data object, and return the rendered HTML as the response body.
Render an html5 template with todos.ejs in a deno app, inject a title from a parent object, and run the server with extra permissions to view in the browser.
Render lists of data by iterating an array of to dos with id and name, rendering each to do in the template to produce dynamic content with Dino and eggs.
Handle errors in Deno by wrapping the asynchronous middleware chain in a try-catch to catch and report issues, and use the eggs templating engine to render dynamic pages.
Explore styling a user interface for Deno development by using Bootstrap components, especially the list group, by copying markup from Get Bootstrap and applying it to a to-do list.
Handle a form submission in a Deno app by posting to the todo route, extracting and validating the new todo title from the form body, and redirecting to main page.
Learn how to validate a to-do form by preventing empty inputs, displaying a danger alert with a 'you cannot be empty' message, and conditionally rendering errors using Bootstrap.
Restructure your Deno app by moving routing logic into a routes folder and templates into a views folder, update imports and paths, and adopt an mvc-inspired architecture.
Implement delete in your CRUD flow by posting a delete request with the to-do id, routing to delete, and filtering the array to remove the item.
Add a delete button tied to a delete route and form for each to-do item, using bootstrap layout to align the delete button with every list row.
Create a route to retrieve a todo by id with a get request and render its detail page for updating, including an update form pre-filled with the current todo name.
Learn to render a dynamic to-do list with an ejs template, link items by id, and handle updates and errors via defined routes and handlers.
Update a todo by extracting id from the route, validating input, updating the title, handling errors, and redirecting to the details page, while noting future database persistence.
Learn to enable data persistence in a Deno app by connecting to MongoDB, a popular NoSQL database, with options for relational databases or other storage mechanisms.
Explore how MongoDB stores data as collections of documents representing entities, with each document containing fields such as name, image, price, and expiry date within products and users collections.
Learn to set up MongoDB Atlas, create a free M0 cluster, configure database access and security, and whitelist your IP to connect from your local machine.
Connect Deno to MongoDB using the Deno MongoDB driver and the official Rust MongoDB driver, and export a single getTodoCollection for the todo collection.
Establish a single database connection, insert a new todo with insertOne, and fetch all todos from the database, ensuring insertion completes before redirecting to the main page.
Run the Deno app with the required MongoDB permissions, connect to Atlas, fetch databases and collections, and view documents including the _id to understand MongoDB structure.
Learn to read data from MongoDB by retrieving all documents in a collection, with optional filters such as a name, and adapt to schema changes by mapping _id to id.
Switch from array access to MongoDB collection queries and retrieve a single to-do with findOne using an id filter; cast the id properly to avoid type errors.
Update a todo in a Deno app using MongoDB by finding the target document and applying a $set to its title. Await the update and redirect after completion.
Delete a todo in MongoDB using deleteOne, targeting the specific document by id and awaiting completion before redirecting to the main page, similar to findOne and updateOne patterns.
Apply the MVC pattern to organize code into model, view, and controller for a maintainable deno development project, with Mongo DB schema and collections via Dino Mongul.
Explore how server-side rendered views work with tablets and how an API serves data to mobile apps and browsers, including endpoints for listing, adding, editing, updating, and deleting products.
Duplicate the project from last section, delete the views folder, adapt the helper and product schema, and create a database with products and similar products collections for a rest api.
Develop a post /products endpoint in Deno that accepts a json body with name, description, and price, inserts into MongoDB, and returns the generated id; test with Postman.
Implement a get products endpoint in deno that retrieves from the mongo products collection and returns a simplified array with direct id access via a products formatter.
Create a patch endpoint at /products/:id to update a product by id, parse json body, and apply a MongoDB updateOne with $set, returning the updated product.
Create and test an endpoint to delete a product by id using an http delete request, returning a response body with a deleted message and validating removal via Postman.
Enable cross-origin resource sharing (CORS) in a Deno API using a CORS middleware and origin and method controls to let front-end clients access resources.
In this course, we take you on a fun, hands-on and pragmatic journey to learning Deno development. You'll start building your first Deno app within minutes. Every chapter is written in a bite-sized manner and straight to the point as I don’t want to waste your time (and most certainly mine) on the content you don't need. In the end, you will have the skills to create a Deno web app and a Deno REST API.
In this course, we will cover:
Chapter 1: Introduction
Chapter 2: Introduction to Oak
Chapter 3: Introducing Templating Engines
Chapter 4: Styling a User Interface
Chapter 5: Re-structuring Our App
Chapter 6: Implementing C.R.U.D. Operations
Chapter 7: Using MongoDB as Our Database
Chapter 8: Building Rest APIs with Deno
Chapter 9: Comparing Deno and Node
The goal of this course is to teach you Deno development in a manageable way without overwhelming you. We focus only on the essentials and cover the material in a hands-on practice manner for you to code along.
Working Through This Course
This course is purposely broken down into nine short chapters where the development process of each chapter will center on different essential topics. The course takes a practical hands-on approach to learning through practice. You learn best when you code along with the examples in the course.
Requirements
No previous knowledge of Deno or Node development required, but you should have basic programming knowledge.