|
NihilCredo posted:Well there is a community linter, it's integrated in the F# Power Tools. But I agree that an official MS style guide would make a much better impression on CTOs and assorted suits.
|
# ¿ Aug 28, 2016 17:59 |
|
|
# ¿ May 22, 2024 18:33 |
|
amotea posted:Something like this http://fsharp.org/specs/component-design-guidelines/ ? spiderlemur posted:Kind of a separate question: Is there any point to integration tests (and/or using poo poo like Selenium), or can everything more or less be covered with good unit testing? This post is little old but is still very doable and I think aspnet core is going to encourage more of this: https://blogs.msdn.microsoft.com/webdev/2013/11/26/unit-testing-owin-applications-using-testserver/ Setup the first time is a little trickier because you have to work out how to manage injecting your mocks and stuff, but I think it can be a useful midway point between simple controller tests and full blown UI tests.
|
# ¿ Aug 30, 2016 16:00 |
|
How you want to deal with one or more network requests failing also matters.
|
# ¿ Oct 28, 2016 21:03 |
|
chippy posted:I'm curious about this - I've never really looked deeply into the SQL that gets generated, other than a quick glance out of curiosity. It did look pretty terrible. Is there a reason that it can't be optimised into a decent execution plan? I always thought that due to SQL being declarative rather than imperative, a bunch of lovely SQL vs a some good SQL that did the same thing as the lovely SQL, would basically be optimised and end up with pretty much the same execution plan? Is this not the cause? Or does EF just generate such monstrous queries that the optimiser can't do much with it?
|
# ¿ Dec 6, 2016 20:35 |
|
You can also do it anonymous types if you don't want to write a class.code:
|
# ¿ Jan 2, 2017 14:38 |
|
chippy posted:Thoughts on the Unit Of Work/Repository pattern? I'm considering implementing repositories to use in my service layer, mostly to assist with unit testing/mocking, but as the UoW pattern's primary use seems to be to make sure the repos all use the same context, this seems redundant as I'm using Autofac to inject my context with an instance-per-request lifetime. If you find you're adding more specific or complex domain methods to the repos then it's a sign you could switch a cqrs like model. If you want to try that you don't have to go all in with a framework for it, there's nothing wrong with starting with something like this: code:
If there's a team working on a new project in a professional context you want a bit more forward planning but this is for your studies, right?
|
# ¿ Mar 9, 2017 22:51 |
|
Most C# coding standards mandate one class per file, it's usually a good rule until it isn't. For code like that I'd put all your generated classes in a separate file because they are "different" sort of code that should be separate from your logic, but not move them out to individual files per class because they are so closely interlinked and if you want to regenerate them it's all in one place. Really it's a per-taste thing, the compiler doesn't care.
|
# ¿ Mar 16, 2017 23:46 |
|
Munkeymon posted:ASP still won't route something that looks like a number to {*url} though. I hate the way ASP does routing I haven't bothered with the setup on many projects but I think it's worthwhile spending the time on big enough ones. We've caught some tricky deserialisation problems with it and it's great to have instant turnaround on route conflicts etc.
|
# ¿ Jun 13, 2017 22:19 |
|
sausage king of Chicago posted:so i'm using Masstransit and RabbitMQ for messaging and running into a problem which i'm going to try to badly explain. there's a common assembly that a bunch of services use to dispatch events that looks like this: If I understand correctly you want to close the connection when there's nothing to send? You could try something like this: code:
(note: entirely untested, and you probably want to think about the error handling paths and maybe passing exceptions back in the task completion source) Edit: actually yeah you definitely need to catch opening/sending exceptions and set them on the tcs or the callers will never return on error. Destroyenator fucked around with this message at 08:14 on Aug 25, 2017 |
# ¿ Aug 25, 2017 08:05 |
|
Munkeymon posted:I was reading https://www.theatlantic.com/technology/archive/2017/09/saving-the-world-from-code/540393/ and it occoured to me that the Chrome (and probably FF?) debuggers do something I really appreciate when I'm at a breakpoint where they just display all of the locals inline instead of making me hover over individual elements or futz with the panels to see the values. Is there an extension that does that? If not, am I the only one interested in such a thing?
|
# ¿ Oct 5, 2017 18:29 |
|
They can do entity tracking so when different part of your codebase ask for Car id 7 they get the same in memory object. They can also do change tracking so when you modify that object you can then do a "save" style operation which will generate an appropriate UPDATE rather than a full overwrite. Sometimes these are good features, sometimes not. edit: the change tracking can also involve adding or removing from list properties on the object where they make sure the linked item is inserted or deleted and foreign keys all work out etc. Destroyenator fucked around with this message at 22:43 on Oct 31, 2017 |
# ¿ Oct 31, 2017 22:41 |
|
|
# ¿ May 22, 2024 18:33 |
|
Portland Sucks posted:More to the point I think the reason why I struggle with seeing how an ORM could fit into our existing process is because it seems like ORMs rely on conforming to some kind of baseline with regards to how your backend is structured and ours is literally chaos (they call it "flexibility").
|
# ¿ Nov 1, 2017 21:42 |