|
if you throw away all the unix stuff the unix philosophy isn't bad.
|
# ? Jul 28, 2014 16:01 |
|
|
# ? May 25, 2024 00:37 |
|
Shaggar posted:if you throw away all the unix stuff the unix philosophy isn't bad. (yep, there's a lot of crud there but it advocates building systems out of a component architecture, but a radically simpler one based around binary streams between chunks)
|
# ? Jul 28, 2014 16:21 |
|
Shaggar posted:y'all need to go back and read some wpf tutorials and stay away from stack overflow until you get the tutorials to work. some days I can't get out of bed and some days I furiously work on thing for 12 hours straight with no breaks and that was one of those days BONGHITZ posted:just make a command line program, all the best programs are command line programs i have only ever done this and web things which is why uis are stupid and confusing Bloody posted:i still use winforms for my half hour long bespoke serial port bangers the Internet told me winforms is dead and do everything in wpf from now on
|
# ? Jul 28, 2014 16:35 |
|
hey is wpf like the same thing for metro/wp8 apps? because i tried that once and it looked a lot like that xaml there.
|
# ? Jul 28, 2014 16:38 |
|
Careful Drums posted:hey is wpf like the same thing for metro/wp8 apps? because i tried that once and it looked a lot like that xaml there.
|
# ? Jul 28, 2014 16:46 |
|
Shaggar posted:the whole thing you're doing with the static instance is really weird, dude. NOPE THEY'RE ALL STILL 0 i swear to god i'll paypal 5 dollars to whoever can make these loving labels update i am absolutely furious and i'm never touching wpf again without a 1500 page loving reference book that i bought off the loving internet
|
# ? Jul 28, 2014 16:57 |
|
fiverr.com
|
# ? Jul 28, 2014 16:59 |
|
coffeetable posted:i didnt think much of code complete & the pragmatic programmer. lotta pages that say very little i shall remember these, thanks! tef posted:any book spine wider than your thumb is probably a reference manual, or reads like one. or worse, somewhere between a manual and a textbook and suitable for neither. i havent coded enough to know what i actually need to know, thats why i was looking more for books on general topics
|
# ? Jul 28, 2014 17:01 |
|
coffeetable posted:reactiveui's documentation is non-existent, but off the top of my head i can't decide if i'm stupid or if reactive is doing something dumb i have a reactivelist<viewmodel>() with an reactivecommand<ienumerable<model>> subscribed to text in a textbox. when the text changes i'm using a throttled whenanyvalue call to invoke the command. all i want to do is invoke another command when an item in the reactivelist is selected. it feels like this should work code:
|
# ? Jul 28, 2014 18:03 |
|
Luigi Thirty posted:NOPE THEY'RE ALL STILL 0 let's talk about how bindings work in WPF: by writing Content={Binding PlayerTotal}, you request that the program searches up the UI tree until it finds a UI element with a DataContext object that has an PlayerTotal property. when it finds such an object with such a property, it does two things: first, it uses the property's current value to set the Content attribute. second, if the object implements IPropertyNotifyChanged, it'll subscribe to the PropertyChanged event. when someone raises the PropertyChanged event, they supply the name of the property that's been changed, and anyone who's interested in that property will then check to see what the new value is. so the convention is that you raise the PropertyChanged event from inside the setter for each property you want to bind to. most MVVM frameworks have some way to make this simpler: in ReactiveUI's case, you inherit from ReactiveObject and write your properties as code:
|
# ? Jul 28, 2014 18:05 |
|
sounds like a pain in the rear end how is it any better than the old pain in the rear end way of doing it
|
# ? Jul 28, 2014 18:10 |
|
Careful Drums posted:hey is wpf like the same thing for metro/wp8 apps? because i tried that once and it looked a lot like that xaml there. yes. they are the same from a syntax and usage standpoint but the metro/wp8 runtime has different, metro specific ui components. the biggest difference is Microsoft has certain ui guidelines for metro apps that you're supposed to follow. w/ wpf apps you can do w/e
|
# ? Jul 28, 2014 18:12 |
|
this bitcode:
code:
as an aside, Introduction to Rx is $1.32 on Amazon and both a good read and a light read. well worth it if you're gonna be mucking about with Rx a lot.
|
# ? Jul 28, 2014 18:14 |
|
Bloody posted:sounds like a pain in the rear end how is it any better than the old pain in the rear end way of doing it Malcolm XML posted:winforms suffers from being totally loving horrible for anything complex
|
# ? Jul 28, 2014 18:15 |
|
coffeetable posted:this bit all good, i figured it out. turns out i wasn't binding to the view.list.selecteditem so the whenany wasn't actually firing i really wish the dude who does reactive would produce some decent docs because his library is great except trying to parse his xml documentation is a special kind of hell
|
# ? Jul 28, 2014 18:18 |
|
Luigi Thirty posted:i have only ever done this and web things which is why uis are stupid and confusing umm excuse me??? web things and CLIs ARE user interfaces stupid!
|
# ? Jul 28, 2014 18:21 |
|
we are all webapps
|
# ? Jul 28, 2014 18:41 |
|
Luigi Thirty posted:NOPE THEY'RE ALL STILL 0 that's pretty bad dude, but there are 2 problems. the biggest one is the viewmodel you're changing isn't the one you set as your data context. either change static BlackjackViewModel blackjackViewModel = new BlackjackViewModel(); to static BlackjackViewModel blackjackViewModel = BlackjackViewModel.Instance; or change this.DataContext=BlackjackViewModel.Instance; to this.DataContext=blackjackViewModel; You are basically creating a static field on your view named blackjackViewModel and that's what you're doing all your updates do but you are initializing it using a protected constructor instead of accessing the singleton you created for Instance. you shouldn't be using a singleton at all but w/e. the second, is that for some reason w/ this project its not updating the viewmodel w/out INPC. I fixed the datacontext above and then added the notify change stuff back in and it works.
|
# ? Jul 28, 2014 19:00 |
|
idk why he's using a static viewmodel (he might have mentioned it before) but it basically sounds like he wants a singleton instead
|
# ? Jul 28, 2014 19:11 |
|
hes doing both and neither. his viewmodel is sort of supposed to be used as a singleton, but hes also accidentally creating a separate static instance inside his view. hes doing it so his goofy event handling can access the viewmodel. luigi, when it is done right this is what MainWindow.xaml.cs should look like C# code:
|
# ? Jul 28, 2014 19:16 |
|
coffeetable posted:i didnt think much of code complete & the pragmatic programmer. lotta pages that say very little seconding The Algorithm Design Manual. it's very straight to the point, the stories are fun to read and the second chapter is the best reference on algorithms in general that I've seen. I faintly recall that someone recommended it to Pollyanna and she didn't like it
|
# ? Jul 28, 2014 19:48 |
|
tef posted:(yep, there's a lot of crud there but it advocates building systems out of a component architecture, but a radically simpler one based around binary streams between chunks) the loose coupling part of The Unix Philosophy* is good. the fetishizing of byte streams and the utopian ideal of a single namespace with identical semantics for all members, not so good. i think the useful principle you can extract from that is to use the dumbest transport which will get the job done * haven't read the book, just going by the rantings of kooks on LWN and reddit
|
# ? Jul 28, 2014 20:16 |
|
Symbolic Butt posted:seconding The Algorithm Design Manual. it's very straight to the point, the stories are fun to read and the second chapter is the best reference on algorithms in general that I've seen. books r hard 2 read
|
# ? Jul 28, 2014 21:07 |
|
okay i rewrote it to get rid of the dumb event processing, the half-rear end singleton, and made the viewmodel non-static among other things. now i can see my totals and they update when i set them in the viewmodel!
|
# ? Jul 28, 2014 21:53 |
|
Luigi Thirty posted:okay i rewrote it to get rid of the dumb event processing, the half-rear end singleton, and made the viewmodel non-static among other things. now i can see my totals and they update when i set them in the viewmodel! wow its like if u buy into the mvvm pattern wpf is great!!!!
|
# ? Jul 28, 2014 21:54 |
|
Luigi Thirty posted:okay i rewrote it to get rid of the dumb event processing, the half-rear end singleton, and made the viewmodel non-static among other things. now i can see my totals and they update when i set them in the viewmodel! I would also separate your game logic into another class. I might write up a basic example when I get home.
|
# ? Jul 28, 2014 21:57 |
|
Luigi Thirty posted:okay i rewrote it to get rid of the dumb event processing, the half-rear end singleton, and made the viewmodel non-static among other things. now i can see my totals and they update when i set them in the viewmodel!
|
# ? Jul 28, 2014 22:00 |
|
Malcolm XML posted:wow its like if u buy into the mvvm pattern wpf is great!!!! here lies luigi shaggar was right
|
# ? Jul 28, 2014 22:00 |
|
angular or ember?
|
# ? Jul 28, 2014 22:29 |
|
neither. use knockout
|
# ? Jul 28, 2014 22:34 |
|
i'm going to just infer from knockout's bad website that it's terrible.
|
# ? Jul 28, 2014 22:45 |
|
the only javascripts you should use are jquery and knockout. and even knockout is only for weird edge cases where you don't have a web application server to write your pages for you.
|
# ? Jul 28, 2014 23:04 |
|
angular is beyond overkill
|
# ? Jul 28, 2014 23:05 |
|
i've come around on the superframeworks like angular and ember they make sites feel a lot faster when done well
|
# ? Jul 28, 2014 23:43 |
|
angular has bad documentation of decent features ember has well documented bad features
|
# ? Jul 28, 2014 23:45 |
|
knockout is angular done right.
|
# ? Jul 29, 2014 00:08 |
|
Shaggar posted:the only javascripts you should use are jquery and knockout. and even knockout is only for weird edge cases where you don't have a web application server to write your pages for you. ayy lmao
|
# ? Jul 29, 2014 00:10 |
|
Shaggar posted:the only javascripts you should use are jquery and knockout. and even knockout is only for weird edge cases where you don't have a web application server to write your pages for you. What do you mean by web application server to write pages for you exactly? Are you talking about the foreach? Also, besides a gun to my head, is there any reason to gently caress with gridviews or other forms poo poo if dataTables and webAPI continues to exist? Forms is loving weird.
|
# ? Jul 29, 2014 14:56 |
|
iis/tomcat/etc... are web app servers. they run web app frameworks like ASP.net MVC or Spring MVC. Generate your page from the server. Don't generate your page with javascript.
|
# ? Jul 29, 2014 14:59 |
|
|
# ? May 25, 2024 00:37 |
|
stay away from asp forms poo poo. use MVC and the templates that come w/ it. or write your own templates or get templates from somewhere else. someones probably already written a library to add razor helpers for generating jquery datatables. altho if you really want to you could do just html/js and then use webapi to deliver the data into a datatable. but now u have html sitting somewhere, unattended and untemplated.
|
# ? Jul 29, 2014 15:06 |