« first day (1602 days earlier)      last day (3340 days later) » 

5:00 AM
idk i'm pinging everybody because i'd love to understand this, and i think i finally do
for a complex mvc project, data ----> (maybe a service layer here?? idk, this is me guessing) -----> models -----> controller <----- views
?
 
@ton.yeung I'm surprised your still up.
Oh, I see.
 
god fucking damnit
i wanted to delete my last message
but my stupid ass internet is a son of a bitch
fucking fiber and it sucks balls
basically, MY QUESTION IS THIS:
if i want to do DDD, and MVC, in a complex project, is this how it should be structured, in terms of references and layers?
data repos ------> data service layer ----> models -----> service layer so your controllers don't grow huge -----> controller <---- views
 
@CharlieBrown Can you clarify your InventoryService and the implementation of Inventory?
@ton.yeung I think this is what he is trying to say:
MVC --> Domain <-- Data
If you have an MVC Project then two class library projects.
 
how / why would your domain reference mvc?
 
Don't think of MVC as MVC, think of it as your root UI Framework.
 
5:11 AM
data ---> domain models ---> mvc
think about it like this, what benefit would the mvc code provide to your domain?
not a damned thing
class, teacher, student
 
A Domain would represent business logic
It in essence is your business rules.
@ton.yeung Me or @Steve ?
 
pretty much, class can have 30 students, and 1 teacher, thats a business rule
teacher can teach many classes, student can be enrolled in many classes
real life nouns
real life entities
yeah
exactly
 
Yeah
 
then you could have like.... class.Save(), once you've added teachers and students
 
I believe so.
 
5:16 AM
yup
i have a pretty good grasp on that aspect of it, what we're struggling with, is how does that fit into mvc?
thats great, i do the same thing with people
 
In particular, where does it stand in MVC when you have three separate projects.
Yeah, that is cool with me. Treat me like an idiot, as long as I learn I don't care.
 
yup
 
Yes.
Okay.
 
morning!
 
@ton.yeung And that is one of the key aspects for coupling Repository / Unit Of Work inbetween Data and Domain.
 
5:19 AM
yep, i think you're saying the same thing i was
 
T Save<T>(T entity) where T : class, IEntity;
Yeah, so some form of action will occur when you implement such save.
Domain passes said rule to data, domain would pass said inference to data, data then carries out said implementation.
 
i have fiber
 
@ton.yeung If that exist in IContext.
 
its topping out at 700KB/sec
yeah i'm here
 
I've got Fiber capping at 50 mbps
 
5:27 AM
usually at this time of night, i get 350Mb/sec
 
@Steve I'm guaranteed 50mbps at all times of day or night, no more no less.
 
yeah
 
@ton.yeung Before we move on
 
you're saying what i posted
repos ---> service layer if needed ----> domain models ----> mvc <---views
 
If that exist in your IContext, which would reside in your data layer. That data layer should hold said implementation of said Contract.
 
5:29 AM
morning guys
 
@ton.yeung Okay, just want to make sure I'm not too far off the beaten path.
 
i think the implementation you're talking about is subjective, as a lot of texts (and people), talk about impelementing it different ways
such as when your domain changes, using the observer pattern, or event handlers, or calling the repo, or calling a service layer
 
I think at @Steve does.
@Steve Mediator would work as well.
 
i'm not saying your implementation is wrong, just one of many options
yeah that makes sense, the domains shouldn't care what DAL you're using, or how they're saved, or what they're saved to
 
A Domain should want something like this:

public class InventoryItem : IEntity
    {
        /// <summary>
        /// Gets or sets the identifier.
        /// </summary>
        /// <value>The identifier.</value>
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }
    }
Right?
 
5:33 AM
@Greg you're tying your domains to EF, which is what you shouldn't do, directly
(i think, is IEntity an EF thing?)
 
public interface IEntity
{
    Guid Id { get; }
}
Which is in my domain project.
Then in my data layer I've got:
    public interface IContext : IDisposable
    {
        bool Delete<T>(Guid id) where T : class, IEntity;

        bool Delete<T>(T entity) where T : class, IEntity;

        T Find<T>(Guid id, params Expression<Func<T, object>>[] includes) where T : class, IEntity;

        T Get<T>(Guid id, params Expression<Func<T, object>>[] includes) where T : class, IEntity;

        IList<T> List<T>(params Expression<Func<T, object>>[] includes) where T : class, IEntity;

        IList<T> Where<T>(Expression<Func<T, bool>> predicate, params Expression<Func<T, object>>[] includes) where T : class, I
and
public interface IContextFactory
{
    IContext Create();
}
Yes.
Is that all right so far?
 
following
 
I'm not doing anything wrong yet.
@ton.yeung I've been studying an example @CharlieBrown provided to help me understand.
With the above example, wouldn't you implement the IContextFactory?
Which should hold the state of said item.
@ton.yeung Okay.
@ton.yeung Okay :/
 
Is there a book that has this info @ton.yeung on how to create and handle this complex models?
 
Prevent anemia, as an anemic domain isn't ideal.
@Gotalove I've read several but, they often are far more scattered then you would think in concepts.
 
5:44 AM
@Greg which would you recommend for someone who doesnt know about service layers or repos etc
aha
 
@Gotalove That one and Martin Fowler Patterns Of Enterprise Architecture.
 
thanks guys
alrighty
thats a good breakdown
 
Don't pull a me.
 
Is there much difference in the pro mvc 5 from pro mvc 4?
 
I was working with Desktop apps, so I did DDD. Then I transitioned to MVC while learning DDD and was all like uh, wtf?
@ton.yeung I conceptually understand, I've got to become more familiar with the code approaches.
Especially when reflection is involved.
 
5:50 AM
great
 
@ton.yeung From the way VS2015 is laid out, it is simply Asp.Net MVC 5 with the occassional VNext next to shit.
@Gotalove To explain, Microsoft is ditching their big clunky framework. It was written from top to bottom, to condense. So you only use resources you require, you don't have access to a bunch of stuff you don't need.
This was to help them compete better against Node.js or Angular which have significantly lighter payloads then older iterations of Asp.Net.
So VNext is embodying the lighter payloads, and favors the Cloud. Which makes it faster, as well as several other things.
It also decouples all of your dependencies now, which will add some reliance on NuGet but.
@ton.yeung Sorry :( Trying to help
 
hahahaha you got it
 
@ton.yeung Did you know in VNext, they ditched HttpContext. You have to specifically call it now.
!!wiki nbd
 
NBD can refer to: == Banking == National Bank of Dubai National Bank of Detroit National Bank of Dominica == Logistics == Next Business Day == Computing == The network block device of Linux. == Science == Neurobiological brain disorder == Other uses == Negative binomial distribution New business development No Big Deal...
 
I feel like that is wrong.
@ton.yeung Yeah, they did converge the two.
 
5:54 AM
and here I was comfortably learning mvc 4 when their already moving on
 
@ton.yeung Visual Studio 2015 doesn't call it that though.
@ton.yeung They just call it MVC 5, then if you choose A Class Library or Console it specifically says VNext.
@ton.yeung Which will confuse the hell out of people.
@ton.yeung 2014 actually said VNext or traditional, 2015 doesn't even give you the choice. At least in CTP Update 6
@ton.yeung It is Microsoft, the developers do weird shit.
I'm off to bed, I'll talk to you all later.
@ton.yeung I'm writing a big project in it now.
Become more familiar, I'm practicing for the C# Exame.
MSCD Or whatever it is.
@ton.yeung They don't even give you Linq in a VNext class library, you have to physically call the dependency in the project.json under .Net Core
 
@Greg how long have you been coding?
 
@Gotalove Um, four years I think.
@ton.yeung I don't mind, just different from old Microsoft mindset.
 
in .NET ?
 
@Gotalove All together, I don't really count JavaScript, Html, CSS, or Powershell
 
6:02 AM
okay
That doesnt count college projects does it?
 
@Gotalove I didn't go to college.
I started off in the IT Industry
 
what a waste that was for me
 
?
@Gotalove Honestly, I taught myself and bought a bunch of books and constantly try to figure out SO Questions.
 
I'm not that good at anything IT I just have an understanding of how it all works
 
This chat room has a lot of really experienced developers, which help quite a bit.
 
6:05 AM
infact I'm a developer by chance coz of the job opportunities I landed never thought I'd be one
 
@Gotalove I just like tinkering, so whatever keeps my mind engaged I tend to do.
@Gotalove Same
 
yea I count you as one of them
 
@Gotalove Count me as what?
 
a lot of really experienced developers
 
I've got experience, I understand quite a bit. There are people who make me look like a toddler.
They're happy to share their experience and knowledge as long as you aren't a help vampire.
As you just heard @ton.yeung doing
Anyways, I'm off to bed.
 
6:08 AM
good night then
 
 
THE
6:57 AM
Hi all
everyone awake ?
 
hi THE
 
THE
I am bit confused with WCF service if you could help please
every tutorial I go towards, they show creating a local host wcf service and then create a local project to add service reference to this service
now what I want is to access this service on another server
but localhost address doesn't work on other server
when i try it in the browser
 
morning
:D
 
@SebastianL yo!
 
@THE am sorry am just a beginner as well I have not worked with WCF
 
7:03 AM
@THE Because localhost means something on a computer. Try putting in the ip address of the server that's hosting your service.
 
THE
thanks let me try
do i need to add anything to this

10.0.0.150:78767/HelloWorld.svc
 
No idea. I don't know your setup. Don't you get something like this? i-msdn.sec.s-msft.com/dynimg/IC751549.png
 
THE
you get that in visual studio, but I need to add it to K2 black Pearl
but at the moment I am trying to open it in browser
on other server
 
Then substitute the "localhost" part with the ip of your server
 
morning @BenjaminDiele
 
7:14 AM
yo scheien
 
@THE: Where are you hosting the service?
 
THE
atm no where lol, I am so confused with it, I just don't know how it all works :-(
maybe i need to follow this
 
If you don't know what localhost is, I got bad news for you
 
What happens if you press F5 in visual studio?
 
THE
i know what localhost is the local host
 
7:17 AM
@scheien C̘̘̝̖̻͕̟̳ͧt̰̤͈̤̩̞͓͔ͩͣ̈́ͥu̷̙̺̥̰̗ͮ̐̀ͦ̅͋ͯ͝͡l̩͂̈h̢̛͙͉̺̮̱̥̻̽̃̌̈́ͮ͊ṵ̵ͥ͐ͧ ̦̺͈̠̘̞͙̞ͨ̈̕a̷̹͉̱̘̠ͯͬp̸̷̳̮̤͍̝͙̎͂̉p̅̾ͤ̎͢͜͏̘͉eͥ͌ͯ̐ͨͭ͏̨͈͇͓̫̯̙͎a̸̦̪̱̻̖͓̖͂͂͝r̷͚̠̳̃ͣ̈́ͨ̒‌​s̬͍̲̭̻̫̀́̿́͠
 
@OlegKuznetsov: Can't read that.
:p
 
shrug
@scheien That's because I've mistyped :P
 
Some heavy typos man :p
 
lol :D
 
THE
I am stressed, too much work
 
7:24 AM
Do you have any experience with WCF at all?
 
THE
without understand it yes
have been using .asmx and wcf for over few years now, but never tried to understand the concept behind it
just copy pasted other developers code
 
asmx is the old fashioned soap service type.
 
THE
or you can say I understand most of it, just not the hosting part yet
 
The hosting part is not that different from a regular website
 
THE
because we use sharepoint, before we used to create service library wcf and put it in ISAPI folder
 
7:27 AM
You still have the host/some/path/to/service.svc
 
8:03 AM
yesh, free food at work during meeting \o/
 
@THE Understanding is the key to being a programmer. If you don't take the time to understand why things work they way they do, and continue just copying other peoples code, you'll never be able to develop and debug independently. It might work for some people at their day job, but I honestly think you'd be better off frying burgers with that attitude.
So, learn, learn, learn, learn, and learn some more.
I love the smell of a good rant in the morning. Good morning lads.
 
yo roel
 
THE
to be honest, I would love to learn every single code down to how it executes by processor
but sometimes you can't as your employer wants things to be done, I don't know if every company is like that or if it's just me feels this way
 
@THE same here
 
A good employer understands technology evolves, and investing time in learning and crafting a maintainable code base should be high on the priority list. Of course, getting products out is important too, and these priorities should be balanced. At my company we get the time to create quality code, learning in the process, and in the long term we spent much less time on debugging and feature requests. An employer that's just out for short term monetary gain is a bad employer.
 
THE
8:15 AM
thats an ideal situation
 
Well, I refuse to work for incompetent people. I'd start my own company then.
 
Some employers would be better off running a factory around 1900.
 
Ugh. Don't read comments on tech news sites.
"Chrome is better than IE because it works in the cloud" -- wtf did I just read
 
@RoelvanUden Don't read comments. Happy life.
 
8:30 AM
@RoelvanUden :D
thats like IE works better under windows cuz its form Microsoft :D
 
More like "A BMW is better than a Mercedes because it flies.", no sense was made.
 
Mercedes can fly aswell, so that's wrong!
 
Only if driven off a cliff
but so can a BMW
 
@RodrigoSilva this one literally shouts "DARWIN AWARD"
 
@SebastianL badum tssss
hehe
 
8:41 AM
So MVC6 is going to support dependency injection into razor views. Am I the only one who thinks that is weird?
 
Have you ever had to write an algorithm for the shortest possible path that works for all values of n that are greater than 4
 
@scheien Why is it weird?
 
Probably because I'm used to viewmodels, and that the view is tied to that.
Rather than supplying data from n number of different services/repos/etc
directly in the view
 
Yeah, that's for strong typed views, and that is good. But you can DI other kind of services, like the helpers (e.g. Html.DisplayFor) and tie in your own logic. This way, you can easily alter behavior of all the pages without strong references to your new logic. Tis a good thing, albeit very specific to certain cases.
 
Seems fair
Though as you say, it will be situational.
 
8:44 AM
But indeed, using the DI for other purposes seems a bit weird and bad.
 
So I tried a new game last night
Rocksmith. Anyone tried it?
 
Sounds musicy.
 
It's like a revamped version of guitar hero
with a real guitar.
It was.. stunning.
 
hello sirs. i have question ..will you please answer?
 
Yes.
Did I win?
@T.A.P Just kidding :P
 
8:52 AM
You won the lottery, 5 billion dollars. You just have to send me 5000$ so that I can pay a bank fee, and wire you the money.
 
@scheien Sure, how should I send the money?
 
I can send you an e-mail with contact info
 
Send it to: allineedismoney@jesusismysaviour.com
 
Consider it done.
 
i have a view to show invited friends and one textbox and one search button to find more people to invite...I showed invited people with [HttpGet] and [HttpPost] for finding more people to invite with partial view with results and invite button...if user click invite button and one is invited..how can i update in [HttpGet] results..(sorry if my english is so bad)
jquery ajax with GET?
 
9:02 AM
@T.A.P why are you using post method to retrieve ( finding more people to invite)?
shouldn't that be a GET function
and jquery ajax seems like the right option
 
i use GET to show invited friends at pageload and POST to show more people names Contain(textbox value) when search button is clicked... I will try with jquery ajax to update invited friends .. ^_^. if error google first and then i will come back here ^_^
 
Visual Studio 2015!
 
9:17 AM
My brain has been fried but at least I did it and got it right
 
@ErwinOkken: It's still preview ye?
 
THE
9:40 AM
@ErwinOkken is it good
 
Still preview yes. Some bugs
For the Dutch programmers I have a link with a good explanation of some new stuff :P
 
@ErwinOkken Gimme
 
Is that about VS2015?
 
Its about creating an ASP.NET app in VS2015. Not specifically about VS2015 features, but imo its a good video :)
 
10:02 AM
Is it a good idea to use Func<> as properties?
E.g. Func<string, byte[]> myFunc {get;set;}
 
@SamKhawase My first thought would be no. Why would you want that? Normally if you want some functionality like that, I would put it into an Interface.
Because if you have multiple functions like that, that do somewhat the same, it's usually a better idea to put them in an interface.
 
That's a Func<> that I'm passing to several methods, so I'm thinking to convert it somehow
 
Why would you pass a function and not an object that executes that function?
 
we'll it's kinda hybrid functional-OO code, I'm trying to clean it up
 
10:09 AM
so I'll make properties out of the parameters of the Func<> and use it
 
10:21 AM
@BenjaminDiele Thanks for the input
 
@SamKhawase Sorry, blanked out :D
 
Whoa; how did I ever live without MiniProfiler?!
 
@RoelvanUden Looks nice
 
I detected a few N+1 queries on the project I'm working on already.
Very good tool :-P
MINIPROFILER IS AWESOME. SO, SO, SO AWESOME. :3
 
10:40 AM
Yo dudez
 
@Sippy hai
 
"Yo dude, fix this shit yo" -- thanks profiler!
 
@RoelvanUden Lol
My yo'ing appears to be catching on
Or is your profiler just a bro?
 
It's my brofiler, yo.
2
 
Pahahaha
I am sorely tempted right now to fork that project and call it brofiler with appropriately bro warnings.
"Duuuuuuude, duplicate reader yo!"
 
10:47 AM
Hahahahaha I'd use it!
 
11:42 AM
@RoelvanUden I see you've gone completely to the dark side ^^
Using puush I mean
 
@RoelvanUden: It's the sweetest profiler ever
 
broscript v1.0 landing in 3...2...
 
bro has landed
 
:21943801
                 ____
                /___.`--.____ .--. ____.--(
                       .'_.- (    ) -._'.
                     .'.'    |'..'|    '.'.
              .-.  .' /'--.__|____|__.--'\ '.  .-.
             (O).)-| |  \    |    |    /  | |-(.(O)
              `-'  '-'-._'-./      \.-'_.-'-'  `-'
                 _ | |   '-.________.-'   | | _
              .' _ | |     |   __   |     | | _ '.
             / .' ''.|     | /BRO!\ |     |.'' '. \
             | |( )| '.    ||      ||    .' |( )| |
 

« first day (1602 days earlier)      last day (3340 days later) »