|
Ithaqua posted:Well, part of the problem is that you're not doing MVVM. Not that MVVM is going to make it less verbose, but you're setting yourself up for pain down the line. So it's conceptually far different. Good point. Still, is there an easier way to do what I want to do? "characters in a box on a screen drawn by the OS which the program can treat as a string when events fire" seems like it should be a bit more polished.
|
# ? Jun 10, 2014 19:47 |
|
|
# ? May 6, 2024 19:34 |
|
gently caress them posted:So it's conceptually far different. Good point. No, it's conceptually exactly the same -- WPF and Knockout both encourage you to use the MVVM pattern. You're just not using it for your WPF application. WPF is really powerful and expressive, but it's also very verbose. There's not much of a way around it.
|
# ? Jun 10, 2014 20:12 |
|
gently caress them posted:So it's conceptually far different. Good point. Maybe I'm missing something, but it doesn't seem like you should need to be creating your own DependencyPropertys.
|
# ? Jun 10, 2014 20:15 |
|
GrumpyDoctor posted:Maybe I'm missing something, but it doesn't seem like you should need to be creating your own DependencyPropertys. "It didn't work until I did that." I need to just get a WPF book.
|
# ? Jun 10, 2014 20:30 |
|
gently caress them posted:"It didn't work until I did that." I just quickly glanced through this but this seems like a decent enough quick-start http://www.codeproject.com/Articles/165368/WPF-MVVM-Quick-Start-Tutorial Comedy answers to why it's so verbose: 1) You're using the designer. Please stop. 2) You're using VB
|
# ? Jun 10, 2014 21:27 |
|
Mr. Crow posted:I just quickly glanced through this but this seems like a decent enough quick-start http://www.codeproject.com/Articles/165368/WPF-MVVM-Quick-Start-Tutorial 1) mockups schmockups; but yeah I do it by hand when it's time to get real 2) government job Edit: the actual bindings were done by hand. The layout poo poo was letting the designer do its thing, though. Fuck them fucked around with this message at 21:46 on Jun 10, 2014 |
# ? Jun 10, 2014 21:32 |
|
Anyone have any experience with AutoFixture? We've got an existing large project (doesn't everyone?) with quite a few very old and horribly written unit tests, especially on old classes that have like a dozen constructor parameters etc. so it's a pain to come across one of these tests and have to refactor everything and try to figure out the best approach to getting a good test harness set up. AutoFixture seems like a great middle ground to getting things in a better state, thoughts? gently caress them posted:Edit: the actual bindings were done by hand. The layout poo poo was letting the designer do its thing, though. Which is awful and irritating to everyone, please don't. The designer is there to get a feel for what you're UI will look like, it's a horrid failure as some sort of toolbox / imitation of photoshop. At least that's my factual and very opinionated stance on it
|
# ? Jun 11, 2014 14:59 |
|
Mr. Crow posted:Anyone have any experience with AutoFixture? We've got an existing large project (doesn't everyone?) with quite a few very old and horribly written unit tests, especially on old classes that have like a dozen constructor parameters etc. so it's a pain to come across one of these tests and have to refactor everything and try to figure out the best approach to getting a good test harness set up. I use autofixture quite a bit. I am not sure how it would help or not help given the situation you are in without more specifics. What I use it for is creating test objects from my model. For instance if I have a list of orders, each order has several addresses, several items, several shipments, and each shipment has a bunch of shipped items, and I need to test parsing that into XML, its just a loving pain in the rear end to create and populate all those objects for test data. Autofixture handles all that for you. You can also use it for generating test output data. Say you have IRepository and you mock it and need it to return some dummy records. You can use AutoFixture to generate a bunch of complex data for it to return in a few short lines of code, than have your stub method return it to whatever class you are testing.
|
# ? Jun 11, 2014 16:05 |
|
ljw1004 posted:(Sorry I don't know your answer but...) Google's returns on opencvsharp questions are so sparse that I didn't even know it existed until you mentioned it(although just from a quick look, it seems to be a lot more like working with opencv directly). I don't develop on 8.1 but I run the compiled code\libraries on it without issue. I use most of the libraries including GPU with cuda 5.5.
|
# ? Jun 11, 2014 19:11 |
|
gently caress them posted:I feel like I'm in bizarro world right now. "knockout is just like WPF so easy!" was the selling point, and I did me a knockout. Now I'm back to wpf (WOO!!!) or really "anything that's .NET and makes a windows app." WPF is really wordy. But using MVVM and styles cuts down on the boilerplate. Using MVVM, you will rarely need to create DependencyProperties and your basic binding will be {Binding PropertyName}. You'll still need them when making custom controls and such. Styling and Templating covers those two things. Feel free to ignore anything starting with the DataTemplate section for now. While you've got me talking about WPF, I should mention messaging. It's one way of addressing communication between a View (a Page, Window, etc.) and a ViewModel. WPF doesn't actually come with a messaging class, but MVVM Light and other toolkits do. Messaging is one option (maybe the best option) if you need to navigate between multiple pages in your app.
|
# ? Jun 13, 2014 00:46 |
|
Anyone here happen to know when VS2014 will be released? We skipped VS2013 because I just didn't see the point. However, I've now come across an issue: apparently Intellisense for MVC 5.1 razor views doesn't work in VS2012? Incompatibility with new versions of MVC or EF or whatever would be a good reason to upgrade to a new Visual Studio. But if the next major version would be released in a couple of months, buying 2013 right now could be a bit stupid. Or maybe not, licensing is confusing.
|
# ? Jun 13, 2014 15:27 |
|
Visual Studio 14 CTP was just released 10 days ago. I'm going to guess release to MSDN in early December and official release in February. It could be longer because the next .NET update cycle has quite a few changes in it (Roslyn, ASP.Net vNext) Do you have a MSDN account? If so you can get all the Visual Studio you want
|
# ? Jun 13, 2014 15:48 |
|
I'm using Workflow Foundation under Visual Studio 2013 (latest service pack). My project compiled fine for a while, but started throwing the following error when I tried to build. XC1020: Build error occurred in the XAML MSBuild task: 'Object '/f537cd6c_c118_4d1c_959d_a05ed0d0c69d/na6q2vzvjwxy+8ncvo zsuonu_65.rem' has been disconnected or does not exist at the server. I tried to delete the folder and get latest from github, then rebooted - but the error still appears. I also moved the folder to a higher root level in the file system, just in case the length of the file path caused issues with MSBuild. Is this a dll dependency error, or could it be something else? Just in case it's a resource issue, the VM in question has 30GB of ram and 6 cores. edit: For the record, I am running as administrator (as not doing so is the common cause of XC1020 compile issues) diadem fucked around with this message at 16:31 on Jun 13, 2014 |
# ? Jun 13, 2014 16:24 |
|
gariig posted:Do you have a MSDN account? If so you can get all the Visual Studio you want Yeah, 2013 wasn't a massive release, but there was some good stuff in there, especially for Ultimate users. CodeLens is awesome.
|
# ? Jun 13, 2014 16:32 |
|
uXs posted:Anyone here happen to know when VS2014 will be released? We skipped VS2013 because I just didn't see the point. Not for a while. If you're on an msdn sub, keep renewing. If not, you can get vs pro fairly cheaply with VSO, and if you're big enough you probably want to have an msdn sub.
|
# ? Jun 13, 2014 17:02 |
|
Ithaqua posted:Yeah, 2013 wasn't a massive release, but there was some good stuff in there, especially for Ultimate users. CodeLens is awesome. If this guy is waffling about purchasing an ide I doubt he's on the one that costs $14k/4k a year.
|
# ? Jun 13, 2014 17:06 |
|
This is more of a Visual Studio question than it is a .NET question, but is there a plugin for 2010 that'll make the code not scroll unless the mouse is within the boundaries of the text editor? For example, same Chrome has focus and the mouse is over on my other monitor and I scroll, Chrome does not scroll. On the other hand, if VS has focus and my mouse is on the other monitor, it will scroll the code. I know this is more or less PEBKAC because I think one window has focus, but still
|
# ? Jun 13, 2014 20:44 |
|
Sab669 posted:This is more of a Visual Studio question than it is a .NET question, but is there a plugin for 2010 that'll make the code not scroll unless the mouse is within the boundaries of the text editor? I haven't tried them, but there's a few windows utilities in this thread: http://forums.somethingawful.com/showthread.php?threadid=3636485 that change how scrolling works with focus.
|
# ? Jun 14, 2014 00:06 |
|
Mr. Crow posted:Anyone have any experience with AutoFixture? We've got an existing large project (doesn't everyone?) with quite a few very old and horribly written unit tests, especially on old classes that have like a dozen constructor parameters etc. so it's a pain to come across one of these tests and have to refactor everything and try to figure out the best approach to getting a good test harness set up. Tremendously useful in eliminating some tedium from unit testing. No reason not to use it.
|
# ? Jun 14, 2014 00:57 |
|
I have a more novice-oriented question to ask. I developed a C# Win Forms application that interacts with a SQL Database for class. I wanted to be able to deploy the application so I can add it to my portfolio. In order to make it more portable, I remade the database as a local DB inside Visual Studio 2013. I then used Install Shield to create a Setup project, and I added the .mdf and .log file to the Database directory that's one tier below all the app files. I then installed local DB on a test machine and installed my app. The problem is that, on the test machine, the application looks like it's connecting to the database, but a SqlException object is being thrown stating that my table objects don't exist. I addressed my tables in the code as follows: SCC.dbo.tableName -- where SCC is the name of the database. Here's the connection string: string connectionString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database\SCC.mdf;Integrated Security=True;Connect Timeout=30"; Any help would be much appreciated. I haven't been able to find anything via Google searches as of yet. The application works perfectly fine within Visual Studio, and even as an installed application on my development machine, which is strange.
|
# ? Jun 15, 2014 21:09 |
|
Stupor Mundi posted:I have a more novice-oriented question to ask. I developed a C# Win Forms application that interacts with a SQL Database for class. I wanted to be able to deploy the application so I can add it to my portfolio. In order to make it more portable, I remade the database as a local DB inside Visual Studio 2013. I then used Install Shield to create a Setup project, and I added the .mdf and .log file to the Database directory that's one tier below all the app files. I then installed local DB on a test machine and installed my app. The problem is that, on the test machine, the application looks like it's connecting to the database, but a SqlException object is being thrown stating that my table objects don't exist. I addressed my tables in the code as follows: SCC.dbo.tableName -- where SCC is the name of the database. Here's the connection string: string connectionString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database\SCC.mdf;Integrated Security=True;Connect Timeout=30"; The first place to start would be to connect to the DB in question outside of your app with some sort of DB management program, and see if indeed the tables are there. I am guessing that you are somehow deploying an empty database.
|
# ? Jun 16, 2014 15:43 |
|
If I'm deploying a desktop application with a local database, I like to include all the necessary scripts/migrations to set up a database rather than including an already created one with the deployment (if there's not a significant amount of seed data, anyway).
|
# ? Jun 16, 2014 16:00 |
|
Bognar posted:If I'm deploying a desktop application with a local database, I like to include all the necessary scripts/migrations to set up a database rather than including an already created one with the deployment (if there's not a significant amount of seed data, anyway). This is my approach as well. I'll throw something like this in my Program.cs (crappy example) C# code:
|
# ? Jun 16, 2014 18:29 |
|
So my coworker accidentally deleted a Designer file. No big deal, right? Just do an Update from SVN and have it restored. Nope. Re-open the solution in VS and despite both classes having the same namespace and everything, the 'normal' code behind has the keyword partial grayed out and says "Partial class with single part", and it can't find the implementation for InitializeComponent() since that's in the Designer file. I tried deleting the whole folder and doing an update from SVN, instead of trying to restore just the Designer.cs file but it's still giving me the same problem. Any ideas? e; For what it's worth, in the Solution Explorer the Designer file is showing up with a white, blank document icon next to it instead of the usual icon. Sab669 fucked around with this message at 20:45 on Jun 16, 2014 |
# ? Jun 16, 2014 20:42 |
|
Which Visual Studio?
|
# ? Jun 16, 2014 20:55 |
|
Oh, 2010, sorry. Edit again; Well, ended up just copy-pasting the .cs, Designer.cs and .resx files into another directory, deleting the original files from the project in VS, then moved the "backups" back into the folder, and used Add Existing to get them back into the project and it seems OK... But I'd still like to know if there's another way to fix that issue, if anyone knows Sab669 fucked around with this message at 21:07 on Jun 16, 2014 |
# ? Jun 16, 2014 21:02 |
|
We have devices which use multicast UDP to announce their existence and they send these packets out somewhere between every 1 to 1.5 seconds. If I don't receive a packet 'every so often' I need to remove it from the discovery list. Every once in a while a packet is received much later ( + a second or 2 ) than it should be. If I compare the reception of my program to a wireshark capture the majority of packet deltas agree except for the outliers - these show up on time in wireshark. Since wireshark doesn't have this issue I know my pc is receiving the packets on time but for some reason my app isn't being notified in a timely manner. Here's a simple example that shows the issue - in this case I have about 20 devices on the network but I'm only printing out the deltas for a particular unit to help with debugging. Is there anything I'm doing which might be causing these issues? EDIT fixed by increasing the ReceiveBufferSize from the paltry 8k default. code:
fankey fucked around with this message at 23:55 on Jun 16, 2014 |
# ? Jun 16, 2014 22:53 |
|
fankey posted:We have devices which use multicast UDP to announce their existence and they send these packets out somewhere between every 1 to 1.5 seconds. If I don't receive a packet 'every so often' I need to remove it from the discovery list. Every once in a while a packet is received much later ( + a second or 2 ) than it should be. If I compare the reception of my program to a wireshark capture the majority of packet deltas agree except for the outliers - these show up on time in wireshark. Since wireshark doesn't have this issue I know my pc is receiving the packets on time but for some reason my app isn't being notified in a timely manner. Here's a simple example that shows the issue - in this case I have about 20 devices on the network but I'm only printing out the deltas for a particular unit to help with debugging. Is there anything I'm doing which might be causing these issues? Gc pauses maybe? .net and windows aren't realtime so it could be a lot of things
|
# ? Jun 16, 2014 23:53 |
|
RICHUNCLEPENNYBAGS posted:Tremendously useful in eliminating some tedium from unit testing. No reason not to use it. This thread is over 7 years old and the OP sucks. It would be really cool for someone to create a new OP with stuff like this in it (AutoFixture). Helpful common libraries and VS addons, newbie resources, books, etc.
|
# ? Jun 17, 2014 01:35 |
|
Knyteguy posted:This thread is over 7 years old and the OP sucks. It would be really cool for someone to create a new OP with stuff like this in it (AutoFixture). Helpful common libraries and VS addons, newbie resources, books, etc. I'll second this request.
|
# ? Jun 17, 2014 14:46 |
|
If Fastbreak doesn't want to do an overhaul of the OP, I'll volunteer. Here's a comprehensive list of my qualifications:
|
# ? Jun 17, 2014 15:43 |
|
Ithaqua posted:If Fastbreak doesn't want to do an overhaul of the OP, I'll volunteer. Here's a comprehensive list of my qualifications: Good enough for me.
|
# ? Jun 17, 2014 15:49 |
|
Any suggestions on a good book to learn MVC? Coming from a background in webforms.
|
# ? Jun 17, 2014 19:33 |
|
c355n4 posted:Any suggestions on a good book to learn MVC? Coming from a background in webforms. Assuming you mean ASP.NET MVC, maybe http://www.amazon.com/Pro-ASP-NET-Experts-Voice-ASP-Net/dp/1430265299/ref=sr_1_1?s=books&ie=UTF8&qid=1403031126&sr=1-1 ? I've used version 4 of this book as a reference and it's pretty solid. If you're not familiar with the MVC pattern it explains it, and at least in version 4 a good portion of the beginning of the book is building a multifaceted web project using MVC. YMMV of course.
|
# ? Jun 17, 2014 19:56 |
|
Okay, new OP draft. What books/tools/plugins/resources/etc do you guys want to have in it? ----------------------------------- After 7 and a half years and over 400 pages, it's time for a new .NET megathread! What is .NET? Wikipedia posted:[The] .NET Framework ... is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large class library known as Framework Class Library (FCL) and provides language interoperability (each language can use code written in other languages) across several programming languages. Programs written for .NET Framework execute in a software environment (as contrasted to hardware environment), known as Common Language Runtime (CLR), an application virtual machine that provides services such as security, memory management, and exception handling. FCL and CLR together constitute .NET Framework. What languages can I use write to fancy-pants .NET applications?
What's awesome about .NET languages? First off, Microsoft is constantly improving the framework and languages -- there's usually a new .NET release every 1-2 years, which brings new versions of C#, VB, F#, etc. Since our last megathread in January 2007, dozens of new features have come along, several of which changed the way we write code on a day-to-day basis. The big ones are:
Plus, Microsoft has created some of the best tooling around. Visual Studio is the IDE that every other IDE wishes it could be, and the .NET framework is huge and has built-in classes and methods to do just about everything. I want to develop using Visual Studio, but I'm not paying for it! That's fine, Microsoft has Visual Studio Express for you. Should I be using source control? Yes!
I want to make a website. What should I do? ASP .NET MVC. Don't use ASP .NET WebForms. WebForms was an interesting attempt by Microsoft to make developing web applications closer to developing desktop applications. It didn't really accomplish that, and at this point it really just gets in the way of writing modern, dynamic sites. I want to make a desktop application. What should I do? WPF. Make sure you follow the Model-View-ViewModel (MVVM) pattern. Don't use WinForms. The WinForms architecture practically forces you to mix your presentation logic with your business logic, which is never a good thing. I want to make a "Modern UI"/Metro/Windows Store application! See above, but also look at Microsoft's Windows Store site. I want to do some sort of stuff involving a database! Manually writing queries is for suckers! Use an ORM, but not LINQ to SQL. LINQ to SQL is dying. Microsoft's replacement is Entity Framework. Personally, I prefer NHibernate, but both are better than LINQ to SQL. Should I be writing unit tests? Yes. Books/Sites General
Unit Testing
Frameworks/Tools Visual Studio Plugins
|
# ? Jun 17, 2014 20:04 |
|
Ithaqua posted:I want to make a desktop application. What should I do? I really want to break out Modern UI and/or WPF apps into its own thread (like how it's done with iOS and Android). Would that be a good idea, or should this thread handle everything? EDIT: Oh yeah, what about Mono/Xamarin? That might be good for the OP. EDIT 2: Nevermind, the iOS stuff is in the Apple Development thread. So Modern UI should should be fine in there. I am dumb Drastic Actions fucked around with this message at 21:35 on Jun 17, 2014 |
# ? Jun 17, 2014 21:30 |
|
Ithaqua posted:Okay, new OP draft. What books/tools/plugins/resources/etc do you guys want to have in it? Looks good. Here's some more stuff - is it worth putting nuget packages under frameworks/tools? Books: Dependency Injection in .NET (Martin Seeman). Database stuff: downloadsqlserverexpress.com. Links to SQL Express install packages, without needing to trawl through MSDN. VS Plugins: Nuget. Package management for .Net. Using nuget you can pull 3rd party libraries into your projects using its package manager console without leaving VS. Frameworks/Tools:
|
# ? Jun 18, 2014 01:21 |
|
Ithaqua posted:What languages can I use write to fancy-pants .NET applications? Sadly, IronRuby has been dead for a while. It's still usable, but it's no longer supported by anyone. If you want to toss some other languages on the list, there's Boo and Cobra.
|
# ? Jun 18, 2014 01:22 |
|
Ithaqua posted:I want to do some sort of stuff involving a database! If you absolutely have to write ad-hoc queries, your queries don't map well to a full-blown ORM, your application is so small can't justify using a full-blown ORM, or you want to query some other IDbConnection provider. Friends don't let friends use DataTables or reinvent the wheel, use dapper. It may also be worth giving a mention to object serialization/deserialization libraries, most notably Json.NET I'd perhaps mention NuGet as the go to for including popular libraries in your apps, as I think it can be easily overlooked by people new to VS. For source control, I always like to recommend TortoiseHg as an easy way to get started with with a DVCS with a friendly GUI without a nightmare-inducing learning curve. (+Bitbucket for free private repos) For unit testing NUnit is maybe worth mentioning as a test-runner and fixture creation library Channel9 http://channel9.msdn.com/ may also be worth mentioning, though maybe better to point to specific tags, but it has a huge amount of useful videos for all levels of programmer All of the above personal preferences but stuff I would've loved to know when getting started
|
# ? Jun 18, 2014 11:10 |
|
|
# ? May 6, 2024 19:34 |
|
Yeah mono deserves a mention. Personally I'd throw ncrunch in there under tools too.
|
# ? Jun 18, 2014 16:03 |