fbpx
Welcome, Guest
Username: Password: Remember me
Share your code snippets, screen shots etc. here
  • Page:
  • 1

TOPIC: Beta 10 and Vs 2017 - great !!

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1384

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Hi guys,

Well, I have given Beta 10 and the Visual Studio integration a bit of a good test earlier today.

I even managed to find the Beta 10 installer before Robert had posted his news ;-0)

I like the improvements and the new version certainly speeded up my task of manually converting Nick Friends IoC (inversion of control) sample from C# into X#. For those who don't know Nick, he created an MVVM sample app for our User Group meeting many years back now, and it still stands the test of time as a useful app pattern to follow. I will make the working X# solution available to those who wish to see it and try it out - Nick, if you have any objection then shout now !

Before we go into more detail about VS 2017, here is the picture of success - yes, it surprised me, I did think I would have more issues than I did :-



Not fantastic to look at, but it all works interactively as expected. Now below we can see that in my code I had already had code lines entered with 'self:' embedded, but today I used quite a few 'self.' with the single dot or point. The next image shows both in one image, lines 24 and 36 :-



And to get a feel for the overall structure in the SE pane, here is the collapsed view :-



And for some of you the expanded view is also useful, informative and instructive :-



Yes, you can see the MVVM general structure, and the References section (expanded below) shows the required Galasoft framework for MVVM as well as the 'IoC' stuff - the Controller to allow us to separate out the opening, display, and closing of the Windows and UserControl GUI stuff.



Now then folks, what are the negatives to what I have done today, what gave ne grief in the VS IDE ?

Well, even though I could happily mix my coded 'self:' and 'self.' bits, when I came to a final compile and run, the code in a file generated by the 'system' showed this :-



Yes, for some reason line 51 and the ' : ' after SELF was not liked. And even though I did not really know what I was doing I changed this manually and the app then compiled and ran !

Here is the change and run screen image :-



So why this happens only on line 51 we need Robert and his Team guys to tell us.

Now then some more issues with VS2017 and beta 10 - I had a few errors and 'drop outs' when VS stopped and reset itself. I was not too surprised - AND _ I was copying chunks of C# code into the X# editor before manually cleaning it up. The Constructors in a few code files gave me most of the drop-out issues. However the one seen below in in the App file :-



I like the #regions and the expand / collapse now available. I will continue to try stuff out as I go along with my preparation for Cologne, but there are a lot to things to try.

Summary is - good news - working apps can be made and got to work.

I realise that VS integration is a complex and difficult aspect / issue, however, it is important to many of us, so work in progress and keep on improving it a few more things at a time. I am more than willing to help by testing.

Cheers, and Best regards,
Phil.
Wales, UK.

P.S. here is one of the constructor issues :-



Hope this helps the Team and some of you guys out there ;-0)

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1385

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Hi folks,

Here is the link to my OneDrive folder where you can find Nick's IoC sample :-

1drv.ms/f/s!AiCBl-gBWjY9g8sVTCp0IQ2QSN3N2Q

Please let me know if you have any issues or problems with downloading and/or running the sample.

Regards,
Phil.

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1386

  NickFriend's Avatar NickFriend Away Posts: 193
Hi Phil,

No problem and no objection of course. However I would suggest that if you want to do an example with all this stuff, the one I did for DevShare 2015 is much better.... uses generic base classes for data access and various other bits, and attaches to Entity Framework for the data (though you can easily unplug that and put in some static data to make it easier). It's generally better structured.

I thought that was the one you were using... stands the test of time better than the UG one which I did a couple of years before. Another point is that it has plenty of documentation in the code as well.

Nick

Please Log in or Create an account to join the conversation.

Last edit: by NickFriend.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1387

  wriedmann's Avatar wriedmann Away Posts: 1573
Hi Phil,

even if I like XIDE much more than Visual Studio, I have tried to create a small WPF application in VS 2015, and yes, Intellisense works now like expected.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1388

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Hi Nick,

Point taken on the sample, and Generics too, that is another aim of mine.

The issue is however, that unless many of us guys get a suitable, simple enough, example to follow then doing all stuff at once turns guys away. There is just too much new stuff that way around.

I am happy enough now, to focus on IoC (inversion of Control) because I have a good feel for MVVM and making data binding work correctly and 100% of the time. Then there is LINQ, Lambda, Anonymous Types - the list goes on. So I need a steady - steady approach, you know, a bit at a time.

I am thinking of writing in X# various samples, small to medium, and including some parts then more parts in other examples. We need a 'step ladder' approach I feel.

Also remember that you are using C# and have all the features of the language (for years) and 100% of the VS integration works 100% time. We are still on our way to some of those goals.

Us X# guys now have a lot available, but also have a few BIG steps to take to get to doing things the modern .NET way.

But please do keep suggesting to me when you see fit. I need all the ideas I can get.

I will be back to you for Generics ;-0)

Oh! and I also need to fit into the development pattern the Unit Testing, that is a real must.

My immediate plan is to now design and write/create an 'IoC' sample which is simply the switching from one screen to another - the basic framework as it were. I will do that using the current IoC sample of yours, now that I have all the correct X# syntax to use.

Glad to hear that you survived the decorators - what colours do you now have on the walls and ceilings ? Assuming that you still have walls and ceilings, after the mayhem ;-0))

Cheers,
Phil.
Wales, UK.

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1389

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Thanks for doing that test Wolfgang, it helps me out.

I have gone over 100% to VS 2017 Enterprise, so I don't wish to re-visit VS 2015.

Speak soon,
Phil.

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1390

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Hi Nick,

If you have your hands on the DevShare 2015 sample you refer to, could you please post it to me one way or another - OneDrive and shared link is best !?

Then I will look at converting it to full X# code etc., etc..

Cheers,
Phil.
Wales, UK.

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1391

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742


Hi Nick,

I think I have found the sample you refer to.

Is this image looking right, can you remember ?

When I run this in VS 2017 it compiles and runs but seems not to have any backend data.

Did you use a proper EF6 database and Code First approach ?

Cheers,
Phil.

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1392

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Whoops !

Forgot to attach it .............



Does this look right ?

Phil.
Attachments:

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1393

  NickFriend's Avatar NickFriend Away Posts: 193
That looks like it... you'll need to edit the connection string according to your SQL Server instance. I think there should be a Readme file in there somewhere with some instructions/suggestions.

Nick

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1395

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Hi again Nick (and all),

Yes, in image '_02'line 21 replaces your server name string - I discovered some months ago that 'localhost' will work on most SQL Server platforms - full and express from Microsoft. I tend to use this now for sample solutions that I place on 'OneDrive' for sharing and distribution - AND - it makes moving stuff over to laptops for conference sessions a doddle.



So now (see other attachments), the Person and City data appears right away (a few lines/records) and any that I enter stays in the DB between application launch events, it persists.





That's the good news, the bad news is that I can't really understand most of your code as yet ;-0(( I feel like a complete novice! The generic stuff seems a bit to me like the code equivalent of over normalising data - too much of it and all 'apparent meaning' seems to get lost!

Oh! and please remember that this is still your full C# applet, I have not as yet translated it into X# syntax, but I will, as a start to learning more on the generics side of things.

At least with a working X# sample we X# guys can all have a starting point for going further. So your legacy Nick, will linger on for a good few years yet ;-0)

Hope this interests a few.

Regards,
Phil.
Wales, UK.
Attachments:

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1399

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Hi again Nick, the Team (and all),

Using this full project of yours Nick (all in C#) I will give the VS integration in 2017 and X# a good test with my 'VS Enterprise' platform, today and over the next couple of days.

To help out I will record any problems and issues as I go along, then feed them back to Robert and Fabrice.

Its a better test that my previous one as it will be done from scratch (the beginning) under the new integration, so I can see how the SE pane functions as well as the two editors - text and XAML.

A question before I start - see the collapsed SE pane content below :-



Are all of these 7 projects made from Templates in C# of type 'class library' ?

Regards,
Phil.
Wales, UK.
Attachments:

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1400

  NickFriend's Avatar NickFriend Away Posts: 193
Hi Phil,

DS2015Start will be a WPF Application (generates app.xaml and adds the WPF assemblies basically), the rest are plain class libraries. So for the View library you'll need to add the WPF assemblies manually for your user controls - apart from that you shouldn't need references to WPF anywhere else.

Nick

Please Log in or Create an account to join the conversation.

Beta 10 and Vs 2017 - great !! 2 years 3 months ago #1401

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Thanks Nick,

Had got all the other six projects right and with correct and suitable References to assemblies - quite an interesting exercise to do them all at one time - before any added code.

And 'NuGet' in the X# integration seems to work fine.

In removing and adding the 'Start' project I found an issue for Fabrice. Now managed to re-add the DS2015Start project.

Here is what I now have :-



Oh! and the app now compiles and runs - does not do a lot however ;-0)



Regards to all,
Phil.
Wales, UK.
Attachments:

Please Log in or Create an account to join the conversation.

  • Page:
  • 1