PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: This is what I am learning...  (Read 810 times)

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8104
  • Windows 10
    • PlanetSquires Software
This is what I am learning...
« on: March 24, 2017, 07:32:57 PM »

A couple of years ago I got excited about a web based project for a friend and built a whole ecommerce site. That was a great learning experience and really invigorated me back into programming.

For the past week I have been feeling those feelings again but this time it is because of technologies that I dismissed 10 years ago but that have now grown so powerful that they are now hard to overlook as the present/future of Windows desktop client application development.

XAML, WPF, C# and of course .NET

I have an application that I have been putting off building for years. More so for personal enjoyment and growth than anything commercial. I am trying to make a commitment to myself to build that application using the above technologies. The ease of GUI development and data binding ease using XAML and WPF  along with the powerful language depth of C# and .NET should be interesting.

If any of you guys have used these technologies then I'd love to hear your opinions. Even Charles Petzold says these are his #1 technologies these days. It is indeed interesting.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Jean-pierre Leroy

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 461
  • expect nothing, be prepared for everything ...
Re: This is what I am learning...
« Reply #1 on: March 25, 2017, 05:04:57 AM »

Hi Paul,

Thanks for sharing with us what you're learning about these programming technologies.

I would like also to start using also these tools for desktop application development.

I'm curious to know which development tools you choose ? Microsoft Visual studio or SharpDevelopp or ???

Thanks,
Jean-Pierre
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8104
  • Windows 10
    • PlanetSquires Software
Re: This is what I am learning...
« Reply #2 on: March 25, 2017, 09:22:17 AM »

Hi Jean-Pierre,

Honestly, I have been using both for the past week. I installed the new Visual Studio 2017 Community Edition as well as the latest SharpDevelop. Believe it or not, I may stick with Visual Studio because learning these technologies means a pretty big future commitment should I stick with it and I expect Visual Studio will outlive SharpDevelop :)
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8104
  • Windows 10
    • PlanetSquires Software
Re: This is what I am learning...
« Reply #3 on: March 25, 2017, 09:58:12 AM »

Hi Jean-Pierre, I have been recording some resources in a file to keep track of some of the better things that I have come across. Here is what I have so far that may be of interest to you:

NOTES
The most important thing about WPF is data binding. In short, you have some data, typically in a collection of some sort, and you want to display it to the user. You can 'bind' your XAML to the data. WPF has two parts, the XAML which describes your GUI layout and effects, and the code-behind that is tied to the XAML. The neatest and probably most reusable way to organise your code is to use the 'MVVM' pattern: Model, View, ViewModel.


TOOLS/EDITORS/IDE

Visual Studio 2017 Community Edition
https://www.visualstudio.com
Need to download the web installer. There is currently no ISO version but you can create an offline installation by following the instructions on this page: https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio

SharpDevelop
An alternate IDE to Visual Studio for creating .NET based applications.
http://www.icsharpcode.net/OpenSource/SD/Default.asp
A portable version is available along with the regular install versions. It is called the "Xcopyable" version and can be found on the download page at: http://www.icsharpcode.net/OpenSource/SD/Download/Default.aspx

Blend for Visual Studio
Helps you design XAML-based Windows desktop, web, Windows Phone, and Windows Store apps. It provides the same basic XAML design experience as Visual Studio and adds visual designers for advanced tasks such as animations and behaviors.
Since Blend for Visual Studio is included as a part of Visual Studio, you don't need to download it. However, you need to select it in the Visual Studio installer for it to install on your system.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Blend.exe
Using Blend: https://msdn.microsoft.com/en-us/library/jj171012.aspx


C Sharp (C#)

C# Video Tutorials by Derek Banas
I found these to be a good introduction.
https://www.youtube.com/playlist?list=PLGLfVvz_LVvRX6xK1oi0reKci6ignjdSa


WPF (Windows Presentation Foundation)

Build a Music Player application
A great tutorial spread over 50+ short videos showing how to make a music player. I watched this and it really helped me understand how everything fit together and the power of XAML, WPF and C#.
https://www.youtube.com/watch?v=OP0GNuh1pwc&list=PLyekCPhBviGHmn_F7Vi9qzCDuFk1tAtOH


MVVM (Model, View, ViewModel) Toolkits
MVVM Light Toolkit: http://www.mvvmlight.net  (this is the one I will start off using)
Microsoft Prism 5.0: https://msdn.microsoft.com/en-us/library/gg406140.aspx
CaliburnMicro: http://caliburnmicro.com

https://www.codeproject.com/Articles/165368/WPF-MVVM-Quick-Start-Tutorial
https://www.codeproject.com/Articles/819294/WPF-MVVM-step-by-step-Basics-to-Advance-Level



« Last Edit: March 25, 2017, 11:33:59 AM by TechSupport »
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Jean-pierre Leroy

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 461
  • expect nothing, be prepared for everything ...
Re: This is what I am learning...
« Reply #4 on: March 25, 2017, 12:19:17 PM »

Thank you so much Paul for sharing all these valuable notes and links to start with these new programming technologies.
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8104
  • Windows 10
    • PlanetSquires Software
Re: This is what I am learning...
« Reply #5 on: March 25, 2017, 02:42:02 PM »

I have time today so I am going to watch the Music Player videos again but this time I am actually going to try to create it by following along and actually write code. Let's see how high my frustration level goes  :)
https://www.youtube.com/watch?v=OP0GNuh1pwc&index=1&list=PLyekCPhBviGHmn_F7Vi9qzCDuFk1tAtOH
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
Re: This is what I am learning...
« Reply #6 on: March 25, 2017, 03:45:20 PM »

fwiw, - my opinion -I had a 'test program' for programmatically generating G'code for cnc machining, written in visual basic for dos - umpteen years ago. A 'test program', since when I started in c#, I commented it out, put it at the beginning of my developing program and manually translated it into c#. Over the years, I've added much more to it, and a couple of years back added in code for 3d printing. The problems I found, were related to porting it to later versions of visual studio, I always got into a tangle with the security aspects of visual studio, passwords, code signing and the like. Although it was not a commercial product, a few friends used it, but having to mess with .net installs was a put-off for them. M$ have an awful deployment method, unless you buy a third party system. When windows ten came out, I bought a windows phone. Trying to install software onto that, without signing up to the 'app store, is impossible. You need to have a fairly modern Intel processor capable enough to run the phone software in a virtual box, so to speak, or your development crawls along with a usb link, using the phone processor. No wonder the m$ phone is a dead end. Because of these problems, I decided to try firefly and freebasic, and give up on the phone. So far, for what I want to do, I think ff/fb will be easier to use, not too sure of the long term viability, but in truth, nobody knows what is around the corner. M$ built-in help for c# is hopeless, but codeproject and other googable sites generally have some suggestions. Visual studio is fine for small teams of developers (community version) but for a single user, there is much that is not needed, and it adds an unnecessary complexity and overhead, imho.

I have another major project, part written. I'm unsure whether to port it to ff/fb, or carry on with c#. I have no interest in xaml, the cloud, all this fancy web stuff. I have not even enabled javascript in my browser, so many of the g-whizz web sites that folk lovingly craft,  I don't even see.

I do like paper tape and punched cards, however.

Best wishes,

Ray

ps mvvm is the same as mvc, which I was trying to promote - it's been around about 20 years or more. Usually the controller is in the view, anyway.

Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8104
  • Windows 10
    • PlanetSquires Software
Re: This is what I am learning...
« Reply #7 on: March 25, 2017, 04:40:42 PM »

I was a Visual Basic programmer for many many years prior to PowerBasic. I know the DLL hell and install issues pretty well. Luckily, these days .NET is automatically installed on all Windows machines since Vista. I am thinking that as long as I don't use .NET features that are on the bleeding edge then I won't have to require anyone to download and install the latest .NET framework which would be a pain.

xaml is not necessarily the cloud/web. It is also used for client desktop development. I find it incredible being able to write a GUI using only the xaml declarative language instead of manually having to do it via code or a drag/drop visual designer. So much easier...and being able to modify and create new controls without having to resort to low level ownerdraw or customdraw is hugely refreshing.

I used MVC in my web ecommerce project so the concepts are not totally foreign.  :)

For the big project that I want to write I hope to use xaml and C#, and for everything else I will stick with my trusty FF/FB combination. It will be nice to have a few different choices for any projects I write in the future.

It is refreshing not having to write all the low level code just to do simple things. It is also refreshing to have such a huge library of controls already at my disposal without also having to write custom versions of them. I can concentrate on the design of the program as opposed to wasting time having to build the controls that go into the program.

I am finding Visual Studio 2017 to be much faster and snappier than the previous versions I've used. Having the intellisence and code completion is already given me falshbacks to the old days of VB. Also, searching for help/documentation is not a problem for me. I am so used to doing that working with the WinAPI that it is second nature by now.

So far, I've played Metallica's Master of Puppets about 30 times.....
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8104
  • Windows 10
    • PlanetSquires Software
Re: This is what I am learning...
« Reply #8 on: March 25, 2017, 04:43:23 PM »

Also, javascript of today is not like the novelty javascript from years ago. It is now a fully featured and complete language that runs most of the web and ties everything together. I can't imagine using the web without javascript.  :)

...and I don't program for mobile devices so Windows Phone / Android / Apple are not on my radar at all at the moment.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8104
  • Windows 10
    • PlanetSquires Software
Re: This is what I am learning...
« Reply #9 on: March 26, 2017, 07:30:04 AM »

I have time today so I am going to watch the Music Player videos again but this time I am actually going to try to create it by following along and actually write code. Let's see how high my frustration level goes  :)
https://www.youtube.com/watch?v=OP0GNuh1pwc&index=1&list=PLyekCPhBviGHmn_F7Vi9qzCDuFk1tAtOH

I was able to get through the making of the GUI without much trouble. Only a couple of tweaks to the code because the videos were based on .NET from 10 years ago. I couldn't go into the data binding part (probably the most important parts) because half way through he adds a second project to the solution (MP3Collection) but nowhere do I get a glimpse of the full code for it. Too bad but at least I learned a lot about creating the GUI.

Hoping today to find more time to look at the .NET version of SQLite and create a small data entry test project.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
Re: This is what I am learning...
« Reply #10 on: March 26, 2017, 12:34:47 PM »

Hi Paul,

Syncfusion.com have a number of free/downloadable articles/books related to C# - nice ones on machine learning, etc. If you are registered? with codeproject, they often have some very good tutorials on certain aspects. One useful one was on colour conversion to different colour spaces, and another I may play with on Neural networks - I think that was there.

So, how long before we see refactoring, code completion, etc. in your winfbe basic editor? :D

Best wishes,

Ray
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8104
  • Windows 10
    • PlanetSquires Software
Re: This is what I am learning...
« Reply #11 on: March 26, 2017, 01:57:28 PM »

Syncfusion had a whole bunch of free custom controls that I downloaded last week. I also got their ebooks but they weren't as interesting to me as some other documentation I've been reading. A year or so ago I had already purchased a couple of books from Amazon that give me a lot of info about C#, .NET and the CLR.

On another note, using SQLITE with C# was very easy. https://github.com/praeclarum/sqlite-net
Simply add the C# source code file, "SQlite.cs", to the project and ensure that you have the SQLite.dll in your exe folder (debug or release). Works like a charm (so far at least).
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Knuth Konrad

  • FireFly3 Registered User
  • Junior FireFly Member
  • *
  • Posts: 64
Re: This is what I am learning...
« Reply #12 on: May 08, 2017, 12:57:01 PM »

If any of you guys have used these technologies then I'd love to hear your opinions. Even Charles Petzold says these are his #1 technologies these days. It is indeed interesting.

I've touched the .NET framework a bit and rewrote the (very simple) intranet forms I've done back in the days in ASP (although I used VB.NET as my language, not C#). It's indeed a complete life changer, if the language support string data-typing, OOP et al, compared to those very minimalistic OOish approaches of Classic ASP.

I've also know some web (backend) developers, whose language of choice for a long time was Java. And although they still dislike Windows as an OS and code on Linux machines, they stated that they find .NET superior to Java.
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8104
  • Windows 10
    • PlanetSquires Software
Re: This is what I am learning...
« Reply #13 on: May 08, 2017, 02:10:50 PM »

I did end up writing a small utility in order to learn about .NET, C#, and WPF. It was indeed quite easy when compared to the road I went through to learn WinAPI. I enjoyed it and if I was much younger and just starting out in programming then I expect that it would be a primary development language for me.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor