Skip to content

Latest commit

 

History

History
245 lines (204 loc) · 12.5 KB

README.md

File metadata and controls

245 lines (204 loc) · 12.5 KB

Course: Introduction to functional programming in F#

University of Dunaújváros, Hungary

Instructor

Course and study material

Evaluation

  • Ways to earn a grade:
    • Homework (3x) - 100 points
    • Project work (1+1) - 150 points
    • Extra credit
  • Grade 5 - 225+ points
  • Grade 4 - 200+ points
  • Grade 3 - 175+ points
  • Grade 2 - 150+ points
  • Fail - below 150 points

Assignments

  • Assignment #1 - (40 points, due date: Mar 29, 2024).
    • Numbers, sequences/lists, mapping/filtering/folding, discriminated unions, functions/recursion
  • Assignment #2 - (30 points, due date: May 17, 2024).
    • Basic concepts for building web applications with WebSharper
  • Assignment #3 - (30 points) - TBD

Project work

During the course of the semester, you will work on and complete two larger projects.

  1. Mid-term project (50 points, due date: Apr 26, 2024). You should aim for 200+ LOC, not counting boiler-plate and templates/configuration.

  2. Personal project (100 points, due date: last Sunday of the semester) - this is a project you can pick for youself, and it is meant to help you explore F# more fully at your own pace and according to your own interest.

Guidelines for projects

Projects can be native, mobile, or web applications. For both the mid-term and end-of-semester projects, you should:

  • Use a public repository (hosted on GitHub or any other host), and send its URL via email.
  • Have a README.md in the root of your repository describing your project, its motivation, and how to build/run it.

The README should contain 1) screenshot(s) of your application and 2) a try-live link (for web and mobile apps).

For the try-live link, if your app is client-only, use the repository's gh-pages to host it, and add a build action that deploys each commit to it. For an example of such build action, see IntelliLogo's ghpages.yml, and adapt it to your needs. If your app needs a server-side (for data access, etc.), you should set up auto-deployment to a suitable free host (Azure websites, etc.).

If each project was awarded a grade on its own, it would be as follows:

  • Grade 1 (fail). The project fails to compile, has no or incomplete README, doesn't have a try-live link, or has been fully or largely copied from elsewhere.
  • Grade 2. The project idea is unoriginal (it adds little value over an existing project) or has insufficient content.
  • Grade 3. The project idea is unoriginal but the implementation makes significant additions, or it centers on a new idea with missing functionality or incomplete features.
  • Grade 4. The project implements an original idea, and presents a well-rounded, standalone contribution that has good practical value.
  • Grade 5 (outstanding). The project solves a real-life problem for a larger audience, and it does so with a polished user interface (UI) and user experience (UX).

Setting up auto-deployment of your projects

See this page for instructions.

Course sandbox

You can find the code walkthroughs in the course sandbox repositories:

If you encounter NuGet errors about missing WebSharper.* packages, make sure you have the WebSharper developer NuGet feed configured on your system. See instructions.

Course schedule

Mar 1, 2024 (online)
  • Chapter 2, Chapter 3 - Functional programming
Mar 8, 2024 (online)
Mar 15, 2024 - National holiday, no class
Mar 22, 2024 (online)
Mar 29, 2024 - National holiday, no class
Apr 5, 2024 (online)

Be sure to follow along the course Sandbox repository (see above)

  • Asynchronous computations
  • Installing WebSharper project templates
  • Sitelets - doc
    • Routing via endpoint type annotations, endpoint modifiers (EndPoint, Json, FormData)
    • Returning various content types (Text, Json, HTML, error codes, custom responses)
    • Implementing microservices (POST/GET)
  • Client-side programming with WebSharper.UI - doc
    • Reactive variables and views
    • Templating
    • Calling RPCs
  • Example application: IntelliLogo
Apr 12, 2024 (online)
  • WebSharper.UI templating - see the Sandbox
    • Simple web form to collect user data
    • Client->Server calls (RPC)
Apr 19, 2024 (online)
  • WebSharper.UI templating
    • Understanding the difference between FromDocument and Inline for the client-side templating behavior
  • WebSharper.Forms - see the Sandbox
  • WebSharper.Charting - see the Sandbox
  • Active patterns
    • Single-case - used for value conversion
    • Multi-case - used for subdiving into a closed set of "shapes"
    • Partial - used to deal with only a partial set of input values -> must return an option
    • Parameterized partial - using an argument to drive how the returned value is computed
Apr 26, 2024 (online)
  • Adding popups in your WebSharper applications
    • See relevant bits around LoseChangesReason in this commit
  • Quick overview of libraries available for data access
  • Hands-on: Plotting functions - see commit
    • WebSharper.Forms to collect data
    • Parsing math formulas with active patterns
    • Evaluating an AST to compute values of formulas
    • Drawing lines on HTML5 Canvas
May 3, 2024 (online)
  • Working with the WebSharper SPA template (websharper-spa)
    • Converting sitelets to SPAs - see SPA Sandbox for structuring SPAs
    • Switching "pages" in an SPA using client-side routing
    • Setting up auto-deploy with GitHub Actions - see sample script
May 10, 2024 (online)
  • Looking at several student projects and issues

May 17, 2024 (online) - TBD

May 24, 2024 (online) - TBD