Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

SELJE - Look at X Sharp.pptx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Chargement dans…3
×

Consultez-les par la suite

1 sur 46 Publicité

Plus De Contenu Connexe

Similaire à SELJE - Look at X Sharp.pptx (20)

Publicité

Plus récents (20)

SELJE - Look at X Sharp.pptx

  1. 1. Southwest Fox 2019 Look at X Sharp Eric Selje Salty Dog Solutions, LLC Eric@SaltyDogLLC.com @EricSelje
  2. 2. Southwest Fox 2019  Fox Developer since 1985  Consulting/Developing w/ Salty Dog Solutions  “MadFox” since 1995  Maintainer of many legacy apps  NOT an X# Expert Who is Eric Selje?
  3. 3. Southwest Fox 2019 “X# is an open source development language for .NET, based on the xBase language. It comes in different flavors, such as Core, Visual Objects, Vulcan.NET, xBase++, Harbour, Foxpro and more.” What is X#?
  4. 4. Southwest Fox 2019 Questions?
  5. 5. Southwest Fox 2019  History of xBase and Overview of X#  Developing Apps in X#  Differences Between X# and Visual FoxPro  Goals and Timelines of X# Team Agenda
  6. 6. Southwest Fox 2019 History of xBase Languages
  7. 7. Southwest Fox 2019 Now History Differences Conclusion History of xBase Vulcan In the beginning
  8. 8. Southwest Fox 2019 Now History Differences Conclusion History of xBase dBase II (fka Vulcan)
  9. 9. Southwest Fox 2019 Now History Differences Conclusion History of xBase dBase (fka Vulcan) FoxBase
  10. 10. Southwest Fox 2019 Now History Differences Conclusion History of xBase dBase (fka Vulcan) FoxBase Others •QuickSilver •dbXL •MultiBase •Recital •Eagle
  11. 11. Southwest Fox 2019 Now History Differences Conclusion History of xBase dBase (fka Vulcan) FoxBase Clipper Others
  12. 12. Southwest Fox 2019 Now History Differences Conclusion History of xBase dBase (fka Vulcan) FoxBase Clipper Harbour / xHabour Others Open Source, Multi-Platform Clipper Microsoft Windows, Linux, Unix variants, several BSD descendants, Mac OS X, MINIX 3, Windows CE, Pocket PC, Symbian, iOS, Android, QNX, VxWorks, OS/2/eComStation, BeOS/Haiku, AIX and MS-DOS.
  13. 13. Southwest Fox 2019 Now History Differences Conclusion History of xBase dBase (fka Vulcan) FoxBase Clipper Harbour / xHabour xBase++ Others Alaska Software Windows Latest Version: 2.00
  14. 14. Southwest Fox 2019 Now History Differences Conclusion History of xBase dBase (fka Vulcan) FoxBase Clipper Harbour / xHabour xBase++ FlagShip Others multisoft Datentechnik GmbH All flavors of Linux/UNIX Visual FlagShip added Windows Latest Version: 8 (2002)
  15. 15. Southwest Fox 2019 Now History Differences Conclusion History of xBase dBase (fka Vulcan) FoxBase Clipper Harbour / xHabour xBase++ FlagShip Visual Objects Others Codenamed Aspen Renamed Visual Objects Windows Compiler Sold to GrafX Last Version: 2.8 (2012)
  16. 16. Southwest Fox 2019 Now History Differences Conclusion History of xBase dBase (fka Vulcan) FoxBase Clipper Harbour / xHabour xBase++ FlagShip Visual Objects Vulcan.NET Others Rewritten from Scratch Take advantage of .NET framework
  17. 17. Southwest Fox 2019 Now History Differences Conclusion History of xBase dBase (fka Vulcan) FoxBase Clipper Harbour / xHabour xBase++ FlagShip Visual Objects Vulcan.NET X# Others • Open Source • Compiler Based on Roslyn • Full .NET Citizen
  18. 18. Southwest Fox 2019 Developing Apps
  19. 19. Southwest Fox 2019 Now History Differences Conclusion XSC Compiler
  20. 20. Southwest Fox 2019 Now History Differences Conclusion IDE #1: XIDE  Demo…
  21. 21. Southwest Fox 2019 Now History Differences Conclusion IDE #1.5: XSI  X Sharp Interpreter  Akin to a command window  Can run PRGX scripts  Demo…
  22. 22. Southwest Fox 2019 Now History Differences Conclusion IDE #2: Visual Studio  Project Templates for X# Projects  Add-Ins for X# syntax, formatting, intellisense  Massive development ecosystem
  23. 23. Southwest Fox 2019 Now History Differences Conclusion Demo…
  24. 24. Southwest Fox 2019 Differences between X# and Visual FoxPro
  25. 25. Southwest Fox 2019 Now History Differences Conclusion Cool New Features: Objectify all the things! local dt as datetime dt = DateTime.now ? dt.ToLongDateString() ? DateTime.IsLeapYear(dt.year) ? dt.ToUniversalTime() ? dt.IsDaylightSavingTime()
  26. 26. Southwest Fox 2019 Now History Differences Conclusion Cool New Features: Objectify all the strings! local cString as string cString := "It was the best of times“ ? cString.Length // Property ? cString.ToUpper() ? cString.Replace(“best”, “worst”)
  27. 27. Southwest Fox 2019 Now History Differences Conclusion Cool New Features: Interpolated / Enhanced Strings From this (note all the delimiters): ? “Al’s dad wrote ”+’[“It’s garbudje day” +] + ‘[sic].’ ; + chr(13) To ? e“Al’s dad wrote ”It’s garbudge day” [sic].n”
  28. 28. Southwest Fox 2019 Now History Differences Conclusion Cool New Features: Interpolated / Enhanced Strings cHeader = "This is a header line" cHTML = ei"<TABLE><TH>{cHeader}</TH></TABLE>"
  29. 29. Southwest Fox 2019 Now History Differences Conclusion Cool New Features: Interpolated / Enhanced Strings cHeader = "This is a header line" cClass = "myTableClass" cHTML = ei"<TABLE class="{myTableClass}"><TH>{cHeader}</TH></TABLE>"
  30. 30. Southwest Fox 2019 Now History Differences Conclusion Cool New Features: Even arrays are objects! LOCAL aNames AS ARRAY aNames[1] = “Doug” aNames[2] = “Tamar” aNames[3] = “Rick” ? aNames.Length ? aNames.IsEmpty() AEval(aTables, {|tablename| QOut(tablename)})
  31. 31. Southwest Fox 2019 Now History Differences Conclusion Cool New Features: Lambdas sq := {e => e * e} ? sq ? sq(1) ? sq(2)
  32. 32. Southwest Fox 2019 Now History Differences Conclusion Cool New Features: LINQ VAR oGreek := FROM Developer IN oDev WHERE Developer:Country == "Greece“ ORDERBY Developer:LastName DESCENDING SELECT Developer
  33. 33. Southwest Fox 2019 Now History Differences Conclusion Cool New Features: Anonymous Expressions
  34. 34. Southwest Fox 2019 Now History Differences Conclusion Because it is .NET > 6k Classes
  35. 35. Southwest Fox 2019 Now History Differences Conclusion What’s Missing: Visual Class Designer  Not really necessary anyway for non-UI  VCX files are a source code pain point
  36. 36. Southwest Fox 2019 Now History Differences Conclusion What’s Missing: Report Designer  No converter for existing reports  Plenty of 3rd party report writers • Stonefield • ReportPro • Telerik
  37. 37. Southwest Fox 2019 Now History Differences Conclusion Form Design - WinForms  Classic Windows Forms  No converter available  Fast, Familiar  Work well / Terminal Server  Will be in .NET Core 3.0?
  38. 38. Southwest Fox 2019 Now History Differences Conclusion Form Design - WPF  WPF – Windows Presentation Framework  XAML  No converter  Extremely flexible  Recommended
  39. 39. Southwest Fox 2019 Now History Differences Conclusion What’s Missing (as of this weekend)?  Exception Handling  Inline SQL  Cursors / Browse  SCATTER/GATHER  Full DBC Support
  40. 40. Southwest Fox 2019 Is X# in your Future?
  41. 41. Southwest Fox 2019 Now History Differences Conclusion Recommendation  Enough similarity that it feels comfortable  Enough differences that it’s not trivial  Existing VFP won’t run without conversion  A foot in the past, a foot in the future
  42. 42. Southwest Fox 2019 Now History Differences Conclusion There is a future here  .NET is (probably) not going away  Open Source means no centralized control  What these people have done is amazing  More People need to get involved
  43. 43. Southwest Fox 2019 Now History Differences Conclusion Get Involved  Contribute to source code  Test  Friends of X# (FOX)
  44. 44. Southwest Fox 2019 In Summary
  45. 45. Southwest Fox 2019  Brief History of xBase  How to get started developing in X#  How it is familiar to FoxPro developers  How it is different than Visual FoxPro What You Learned Today
  46. 46. Thank-You! Please fill out your evaluation. Southwest Fox 2019 Eric Selje Salty Dog Solutions, LLC Eric@SaltyDogLLC.com @EricSelje

Notes de l'éditeur

  • Kind of looks like I’m cursing up there
  • This was a little difficult to do because the X# team is working hard and adding FoxPro features fast and furiously.
    I waited as long as I could to get going on this. Maybe too long as my samples aren’t everything I’d have liked them to be.
  • Give you a better understanding of where X# comes from and why it’s different than Visual FoxPro
  • In the beginning, there was Vulcan.

    Created in 1978 by Wayne Ratliff at JPL Laboratories to run his football pool, Vulcan was the ur-language of what would become the bread and butter of everyone in this room.

    And it was good.



  • Vulcan ran on CP/M.
    dBase II added Apple II and DOS
    dBase III also ran on VMS and UNIX
    dBase III+ added ASSIST
    dBase IV
    Sold to Borland in 1990
    Bought Arago for Windows, which became dBase 5 in 1994 but market had moved (Access)
    Sold to Ksoft, renamed Databased Intelligence, then dBase LLC
     
    Current version dBase 2019


  • Fox Software
    FoxBase for Windows, DOS, and UNIX
    FoxPro

    Sold to Microsoft
    Visual FoxPro

    Last version, 9 (2007)
  • Also Arago, which became dBase V for Windows
  • Nantucket Software
    DOS only
    Compiled, not interpreted

    Sold to Computer Associates
    Renamed CA-Clipper

    Last Version: 5.3b (1997)
  • Still ongoing. Just released a new version.
  • Visual Objects was the Windows version of Clipper
    Remember that abbreviation, VO, because that’s the origin of X#.
    Sold to a company called GrafX and continued until its last release in 2012.



  • GrafX wrote a compiler from scratch that took advantage of the .NET framework

    GrafX didn’t put a lot of marketing behind it. This frustrated a core group on their development team, who left in 2015 to start a new effort.
  • As mentioneded in the first slide

    Creates EXEs and DLLs that use .NET Framework
    Use other .NET Components

  • Let’s start by taking a quick look at what a finished X# application. Nobody wants to develop w/ an app that makes ugly applications.

    Demo XIDE.
  • Edit w/ whatever your favorite editor is

    VI, EMACS, Copy Con…
    Rick Strahl used Code




  • Derivative of Vulcan.NET IDE
    Written and compiled in X# itself

    Projects => Applications => Code

    No “Command Window”



  • XSI is a nice way to get used to trying out some of the X# commands, and you can also run PRGs you created with your favorite text editor, but it’s not an editor itself.

    Demos in
    C:\Users\Public\Documents\XSharp\Scripting\Scripts

    HelloWorld.prgx
    Form_Test.prgx


  • 1. Visual Studio Code CLI
    2. Git Integration
    3. Debugging
    4. Live Share
    5. Split Views, Zen Mode
    6. Helpers (Intellisense, Context Menus..)
    7. Integrated Terminal
    8. Plugins and Themes
  • Demo in XSI
  • Demo in XSI

    FoxTypes
  • Demo in XSI

    FoxTypes
  • Demo in XSI

    FoxTypes
  • Demo in XSI

    FoxTypes
  • Demo in XSI

    Arrays are enumerable, so you can use iterators over them almost like a datatable or list
  • CodeBlocks come from Clipper. Lambdas are a .NET thing
    Have been around since 1958 in LISP, much earlier in math notation

    “Here’s a function that I don’t really need to name because I’m only using it for a very short and specific time,”

    Show in XSI

    delegate Square(x as real8) as real8
    local sq as Square
    sq := {e => e*e}
  • C:\Users\Public\Documents\XSharp\Examples\LINQ

    Intellisense
  • C:\dev\xide\prgs\TestAnonymous.prg
  • What else?
  • WinForms
    WinForms is the abbreviated name for “Windows Forms”. This GUI library from the .NET Framework is the oldest GUI library of the .NET Framework and is based on the Windows GDI, with all it's advantages and disadvantages, but has some very important features over the VO GUI classes or generally over the classical Windows GDI that we know from Win32 applications.
    The major advantages of the WinForms library are that they are very fast, work well on TerminalServer sessions, and are familiar to every Windows programmer. They include all of the controls we know from the Windows API, with some very enhanced, like the RTF control that accepts even pasted images. It is possible to use PNG images with transparencies, and the menu control is modernized a lot in it's look.
    The disadvantages include the strict binding to the Windows GDI, so it is Windows only (can be used on Linux only with the Wine library), and it does not scale very well on high resolution monitors because it is bitmap based.
    WinForms applications normally look very familiar because they use the normal look and feel of the Windows platform.
    During the Build 2018 conference Microsoft announced that they would make available the WinForms GUI library also in the .NET Core 3.0 version - so applications built on this GUI should be supported for a few more years than planned. Nevertheless, for new applications the use of the WPF class library is recommended.
  • The WPF GUI classes were developed from scratch - without using the Windows GDI, and completely vector oriented. The WPF GUI library uses DirectX - the graphics interface that was developed for gaming applications, with maximal performance in mind.
    WPF is ideal vor very innovative and flexible user interfaces and requires a completely different thinking from the developer, but it is possible to build very flexible, powerful and beautiful GUIs with it. And well built WPF applications scale from low to high resolutions, from small to large monitors without resizing artefacts.
    Some of the base controls are permitting very interesting constructions: so you can put a grid with different other controls like a listbox, an image or an edit control on a button, or you can replace the items of a treeviev by your own controls.
    Another strong point of the WPF library is the databinding of the controls and windows: you can databind nearly every property to a field in the datacontext. That means not only the content of the control, but also it's size, color, font much more.
    Microsoft recommends to use XAML (a XML-like language) to build windows and user controls, but it is also possible to build them completely in code.
    In short: if you are building a completely new application, you should seriously consider to build it using WPF. And Microsoft has announced on the Build 2018 conference that .NET Core 3.0 will contain a binding to the WPF GUI library (on Windows only, unfortunately).
  • If you’re going to move to .NET from Visual FoxPro, do you want to take a half step. Why not go all the way to C#
  • You will have to decide where X# fits into your development toolbox.
    DBF access from .NET is compelling
    Integration w/ other .NET assemblies

×