9 Replies - 1095 Views - Last Post: 11 March 2015 - 12:08 PM Rate Topic: -----

#1 rayden54   User is offline

  • New D.I.C Head

Reputation: -3
  • View blog
  • Posts: 12
  • Joined: 02-March 15

Sams Teach Yourself WPF...Database?

Posted 10 March 2015 - 11:48 PM

I'm really trying to learn WPF. I have completely given up on grasping MVVM after spending a week staring at it and understanding absolutely nothing about it (so please don't suggest I use it).

I've moved on to trying to learn the MVP view as presented in Sams Teach Yourself WPF in 24 Hours.

Unfortunately, the word "database" is mentioned all of twice and then only to say that a "professional application would use one."

Please, can someone explain to me, how to make the Contact Manager (from Part III) work with a database? I have attached the code example from the book (I hope that's ok-if not tell me).

Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: Sams Teach Yourself WPF...Database?

#2 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6536
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Sams Teach Yourself WPF...Database?

Posted 11 March 2015 - 03:45 AM

You may not *want* to hear about MVVM but you *need* to accept that MVVM is the pattern that 90% of WPF applications use and the pattern that employer use and hire for.

If you're having trouble with their example maybe its time for a different resource. There are dozens of examples on the internet and many books. Maybe you just don't click with that particular author.

Have you tried googling "simple mvvm example"? There are a lot.
This one looks as if it is straight-forward without an over abundance of code to get in the way of see the the basic concept.

I think you are also trying to go too far too fast. You admit you aren't grasping this foundation concept, but you want someone to create an entire db based contact manager for you, then a tutorial about it to walk you through it. That's a little silly don't you think? If you aren't grasping MVVM I really doubt you're going to grasp it with the ADDITION of a database thrown into the mix.
Was This Post Helpful? 1
  • +
  • -

#3 MrShoes   User is offline

  • D.I.C Addict
  • member icon

Reputation: 331
  • View blog
  • Posts: 512
  • Joined: 13-June 12

Re: Sams Teach Yourself WPF...Database?

Posted 11 March 2015 - 04:15 AM

I actually just open sourced my MVVM framework. There's an introductory article at Code Project and you can get it from GitHub. Who knows, it might help?
Was This Post Helpful? 3
  • +
  • -

#4 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6536
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Sams Teach Yourself WPF...Database?

Posted 11 March 2015 - 04:55 AM

:detective:
Really nice MrShoes!
:rockon:
Was This Post Helpful? 0
  • +
  • -

#5 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6536
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Sams Teach Yourself WPF...Database?

Posted 11 March 2015 - 05:02 AM

Oh, and rayden54 let me call attention to the link in MrShoes signature block. That is a link to his tutorial on a data access layer, which would be a good way to go with your need for database. It is a great tutorial on doing what I preach to rookies all the time: Don't re-invent the wheel. EntityFramework already exists so why are you going to try to create your own object-to-relation code?

I realize this might be an aweful lot to thrust upon you at once. It really is a bunch of concepts. You should learn them one by one and start with the basics. But do so knowing that software development IS a lot of concepts. A year from now you will breeze through all this stuff and be looking at something else as the 'advanced stuff'. For now, just keep plugging away at every MVVM tutorial you can find: There are dozens if not hundreds. Lots of books. Even YouTube videos. At some point all those different articles with different approaches will gel in your head and it will all 'click'.

If you get frustrated go wash the truck and take the dogs for a walk and some play time. That does wonders for my morale and clearing my head when I am stuck.
Was This Post Helpful? 1
  • +
  • -

#6 MrShoes   User is offline

  • D.I.C Addict
  • member icon

Reputation: 331
  • View blog
  • Posts: 512
  • Joined: 13-June 12

Re: Sams Teach Yourself WPF...Database?

Posted 11 March 2015 - 05:12 AM

Thanks !

You know, when learning something like this, I spend about 30% of the time reading the source material, 20% trying it out, 20% re-reading the source material, then 30% thinking about it while running or in the shower, then I feel like it's there in my head. Everybody has a different approach to learning, and you'll find a way that suits you. But even when you feel like you're never going to get something, it finally clicks into place and soon you're wondering why you struggled to understand it.
Was This Post Helpful? 2
  • +
  • -

#7 rayden54   User is offline

  • New D.I.C Head

Reputation: -3
  • View blog
  • Posts: 12
  • Joined: 02-March 15

Re: Sams Teach Yourself WPF...Database?

Posted 11 March 2015 - 10:56 AM

View PosttlhIn`toq, on 11 March 2015 - 03:45 AM, said:

You may not *want* to hear about MVVM but you *need* to accept that MVVM is the pattern that 90% of WPF applications use and the pattern that employer use and hire for.

Have you tried googling "simple mvvm example"? There are a lot.
This one looks as if it is straight-forward without an over abundance of code to get in the way of see the the basic concept

Any you should try to understand that I have no interest in learning MVVM. I don't care how common it is.

And yes. I've tried Googling. I've looked at dozens and dozens of examples and every single on of them SUCKS.

I'm not interested in spending a year trying to learn a new fucking paradigm. All I want it to learn how to make my fucking application work.
Was This Post Helpful? -3
  • +
  • -

#8 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15427
  • View blog
  • Posts: 61,808
  • Joined: 12-June 08

Re: Sams Teach Yourself WPF...Database?

Posted 11 March 2015 - 10:59 AM

Let's ease up on the anger there, ray.

We try to operate with a modest modicum of professionalism.
Was This Post Helpful? 0
  • +
  • -

#9 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6536
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Sams Teach Yourself WPF...Database?

Posted 11 March 2015 - 11:32 AM

You don't want to learn MVVM, but you do want to make your program work. How do you suggest we guide you when those two statements are in conflict? Its like saying "I don't want to have to put gas in my tank, I just want to drive my f'ing car." You need to understand we're not going to tell you how to do it the wrong way. That just leads to 5,000 other rookies unwilling to learn the right way telling us that we advocated for doing it the other way.

So I'm afraid this is a case where what you want and what you have to do in order to complete your goal don't align. So you have to decide what to do from here. Either don't do the project, do the project in some crappy way that you'll have to figure out without our help (maybe contact the author of the book you paid for), or suck it up and do it the right way.

Your frustration with your deadlines and your inability to grasp MVVM so far, are not good reasons to lash out at seasoned professionals trying to help you.

Don't become one of "those guys" talked about by people in this business.
Article 1: Not having the life skills to be a developer
Article 2: Why I don't get involved with new members.
Was This Post Helpful? 0
  • +
  • -

#10 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6829
  • View blog
  • Posts: 28,311
  • Joined: 12-December 12

Re: Sams Teach Yourself WPF...Database?

Posted 11 March 2015 - 12:08 PM

View Postrayden54, on 11 March 2015 - 06:48 AM, said:

Unfortunately, the word "database" is mentioned all of twice and then only to say that a "professional application would use one."

Please, can someone explain to me, how to make the Contact Manager (from Part III) work with a database? I have attached the code example from the book (I hope that's ok-if not tell me).

If you click the Tutorials link at the top of this page there is a section for Databases, and the C# section will have some relevant tutorials as well. Or, as mentioned, contact the author to see if he has additional information not in the book. But asking someone to explain, and build, a database from a book is asking too much in a forum question.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1