« first day (728 days earlier)      last day (610 days later) » 

9:54 AM
Hello
@Alex I need help to design structure in .net mvc
https://drive.google.com/file/d/17f5agvvxv-RIKuBck8-duH0qsGFdlnX5/view?usp=sharing
Want to design a structure in a way that can handle all the actions commonly..
Like to create separate partial view and common action to pass modal object to same or different action.
 
 
1 hour later…
10:58 AM
Hi all
AbhishekB., so you're looking for some global components
Partial views can help with that
 
Helloah!
 
Hi Falcon
How are you?
 
doing good, you?
 
Doing all right
 
nice
 
11:12 AM
So you have a few more weeks and you're outta there
 
yep!
2 weeks I think
 
Excellent
When I quit jobs I hated, it was a celebration
Was counting down the days
One job: 340 days
 
xD
Well It's not that I hate my current job
I just wanted something else
that's all
supervisor wasn't my best friend neither
 
Good for you
Is new job MVC/web?
 
it's web yes!
core 3.0 and angular for the front-end
 
11:21 AM
Can't get better than that
 
yupp
:D
 
hello
 
New year, new job. I like it
Hi Roland
How are you?
 
bit tired, need weekend and a holiday
havent slept well the last few days
 
I need a permanent holiday :)
 
11:24 AM
hehe
 
got too much on my mind
 
Read the book: The subtle art of not giving a f*ck
Think you can learn a lot from it my pal.
 
im reading that
 
Than you're failing hard
 
yup
 
11:25 AM
Since I've been thinking about the subject
 
Feel like this
 
Lol Alex
You only live once don't try to overthink things etc but enjoy life :p
 
@Alex @Alex yes something like that.
 
I even started taking motorcycle lessons
 
did you checked the google drive link ?
 
11:27 AM
christmas, new years eve, current job i wanna leave. all those things + more :(
 
Christmas and new years eve are supposed to be fun :P
 
AbhishekB., no, couldn't; don't have privs. For Stackoverflow, best not to post code like that. Share the pertinent code on gist/Github
 
christmas this year: family seperated because of wrong priorities
 
Application will have few categories and each categories have multiple calculation models class. and each of partialview having common actions.
Like " save, saveas, open, report, print etc "
I need something to common logic for each action and Models will be separate parameters / properties for calculations..
@Alex There is no code. its application flow diagram on drive
@Alex kindly check this.
@Alex can we use interface and implement to all calculation, something like that?
share me your thought or any similar pattern you may know to share..
 
sql procedures yikes.
 
11:33 AM
yes !
 
Also, when we're chatting, we can just chat; we can leave off the @name :)
All conversations in these rooms are fully async!
When you have common functionality and pieces that are unique to individual classes, best to use an abstract class which implements an interface
Interface enforces a contract and enables testing/injection
The base abstract class will have the common code, and the classes that differ will have the additional logic/overrides
Partial views can have the abstract class type as the model type
The challenge will be to call the additional props/methods in the view on each child type
Correction: abstract class cannot be passed into a view: stackoverflow.com/questions/5861241/…
Must be concrete type
 
@Alex Noted ok.
I will check and back to you.
 
No worries
 
Thank you brother.
 
You're welcome
 
11:48 AM
@+ name getting alert so have added.
 
That second link also has more ways you may be able to solve the view issue
 
yes. Suppose i have a save action logic do I have write in different action ?
mainly all models and its views (partial) will have same logic to save records to db or in file.json
On current code something like
https://gist.github.com/abhishekbhalani/a482a7c42e56d13336e6e6d123c214cc
 
The save might be one action
You'd have to see how different it is for each
Also, more on the multi-model/one view: c-sharpcorner.com/article/…
Though avoid ViewBag
It's not strongly typed. Will cause more headaches than it solves
 
12:03 PM
yes. currently as per Gist Link.
I have made master class and each model have individual initialization did..
but problem is like when we perform action save have to pass materClass object as parameter in action.
application having 100+ Models classes so it would complex to get performance issue no?
 
No, that would be inefficient
So those 100+ models each have common + different functionality
And they each need to use views
 
yes.
while form submit it need to pass MasterClass object and then have to identify model.
Public class MasterClass{
public CalculationA calcA {get;set;}
public CalculationB calcB {get;set;}
// 100+ around Model properties
}
on partialview have to send MasterClass object but same time either CalculationA or B will be have values
 
Have a base class (not abstract) that has all your common code
Child classes inherit from that and add more code
 
most of properies in the calculationModel class will be different
Abstract Class AbsCalculationA {
}
Abstract Class AbsCalculationB {
}
those will be inherit to each separate Class ?
public class MasterClass : BaseCommonClass
{
public CalculationA{}
public CalculationB {}
}
 
Tough nut to crack
Recommendation: build a simple app with the classes the way you want. Test, refine
 
12:15 PM
OK.
then will share sample code to git..
thank you
 
You're welcome
 
Great man. thanks for your time and idea. see you soon
 
Sure
 

« first day (728 days earlier)      last day (610 days later) »