Contoh proyek nyata di F #

Dalam ekosistem Microsoft, F # menggantikan bahasa eksperimental, yang darinya konsep yang berhasil kemudian dibawa ke C #. Pada saat yang sama, sebagian besar berkat masyarakat, daging cincang telah menjadi alternatif nyata untuk proyek terapan. Di bawah pemotongan, bahan-bahan backend, frontend, tes, perakitan dan infrastruktur proyek yang seluruhnya ditulis dalam F # dijelaskan. Kode sumber dilampirkan.









Diagram wadah
Diagram wadah





Aman

, , SAFe Stack. SAFe dotnet CLI, SPA . .





SAF . . , , , SAFe. 





- ‘S’ - Saturn - Giraffe, , , Asp.net. 





- ‘A’ - Azure. - SAFe, , , , Farmer, , SAFe.





- ‘F’ - Fable - F# JavaScript - .





API Fable.Remoting. Fable.Remoting -. , , ( ). API , ( , , , ) . JSON, .





, , Fable.Remoting, Saturn - Giraffe - Asp.Net. , , Giraffe.





OpenAPI, GiraffeGenerator.





, NoSql DynamoDB. DynamoDb.Ok. Reader. , , . . , , .





C F# . F# Entity Framework Dapper.





: 1, 2 3. , Flexible Types, .





Serilog, Giraffe.





JWT.





AWS AWSSDK, HTTP, SDK .





F# - Fable,  JS. JS. (binding) , .. React .





Elmish - Elm-. Fable.React Bulma.





.





let quizView (dispatch : Msg -> unit) (settings:Settings) (quiz:QuizRecord) l10n = [
   br []
   figure [ Class "image is-128x128"; Style [Display DisplayOptions.InlineBlock] ] [ img [ Src <| Infra.urlForMediaImgSafe settings.MediaHost quiz.ImgKey ] ]
   br []
   h3 [Class "title is-3"] [str quiz.Name]
 
   div [Class "notification is-white"][
       p [Class "subtitle is-5"][
           match quiz.StartTime with
           | Some dt -> str (dt.ToString("yyyy-MM-dd HH:mm"))
           | None -> str "???"
 
           if quiz.Status = Live then
               str " "
               span [Class "tag is-danger is-light"][str "live"]
           br[]
       ]
 
       p [] (splitByLines quiz.Description)
 
       if quiz.EventPage <> "" then
           a[Href quiz.EventPage][str l10n.Details]
    ]
]
      
      







- The Elmish Book.





, , Elmish + Fable.React + Boolma . 2021 , , Feliz + Fable.React.WebComponent + Material UI - Fable.Svetle. .





Aws, AppSync, Aws Amplify.





. ( JMeter ). 





. , F#. . , . FsUnit expecto. , , , , .





, :





  • FsCheck -





  • Canopy - DSL UI





  • NBomber -





Paket. Fake. SAFe. , - , , . , .





AWS Cloud Development Kit. F# , , C#. 





. SAFe . , -.





. , , C#. VSCode Ionide. , , - - . , , , . Ionide Rider. , , .





Ionide, ILSpy, , .





, F# . , . FSI.





Pada awal 2021, F # cocok untuk proyek aplikasi berukuran kecil hingga menengah. Bagi saya, kelebihan bahasa ini adalah:





  • ekosistem pembangunan front-end,





  • tipe sistem,





  • sintaks kompak.





Sampai fitur ini muncul di C #, hal lain dianggap sama, pilihan saya akan mendukung mince.





kode sumber proyek





Gambaran penyemangat bagi mereka yang telah membaca artikel ini sampai akhir.
Gambaran penyemangat bagi mereka yang telah membaca artikel ini sampai akhir.








All Articles