|
Assuming your deleted ids are no longer required you could change your return from void to a list of new objects.
I always returned a list of both updated and new objects which are often views but then I use the database far more extensively.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
DL.InsertUpdate(Job job, Transaction trans) could check if the id = 0 and decide to insert or update if >0.
DL.Insert(Job job, Transaction trans)
DL.Update(Job job, Transaction trans)
I would also create a property on Job of
Job.ReqDelete which
DL.Delete(Job job, Transaction trans) would act on.
Then a public method of
DL.SaveJobChanges(IList<Job> jobs, Transaction trans) .
Another note, all the changes should be wrapped in a transaction, and handle errors so it's all or nothing, other wise the user could have some updates or deletes or insets fail. It's easier for a user and as a process to handle all or nothing.
Schneider
|
|
|
|
|
Seems like a silly question but it can't be just a really good programmer. It can't be just someone who knows what a service layer and generic repository pattern or GOF patterns can it?
If your an Architect does that also mean you know something about the code, the infrastructure, Deployment too? Do you take into account testability?
Or is an architect just someone who knows good SOLID coding practices and such?
<a href=http://www.tadmcclellan.com>TadMcClellan.Com
|
|
|
|
|
The difference between a poor systems designer and a good one. And since you can't architect a system without knowing the business, it's also the difference between a good analyst and a poor one. And in order to come up with a feasible solution, you also need to be technically competent. And in order to properly communicate your thoughts, you also need to be able to write and talk coherently.
Not something one just learns from books; you have to have lived it; and probably have at least one system under your belt to qualify.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Before I retired I was designated a Developer/Architect but only for desktop systems. With 30+ years developing desktop solutions and 15 years in the finance industry I had a good domain knowledge.
I was however totally useless when it came to major systems based on things like Hadoop, AI and analytics (read Python). I could help with a good design but did not have a handle on the technology.
Tad McClellan wrote: you know something about the code, the infrastructure, Deployment too? Yes and not just "something", a deep knowledge of these is critical.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Hi,
my team members are trying to cross compile a huge codebase (4100 forms, 9300 files)
from Power++ (an old C/C++ IDE made by Whatcom/Sybase ano 1999) to C#.
This codebase is very old and has a lot of issues with quality (copy and paste everywhere, spaghetti code, code smells, ...).
Everything started with a tool that converts Power++ forms to WinForms.
(that worked surprisingly well)
But now they want to convert the whole C++ codebase to C# (there is still some manual work needed to make the C# code compile).
They think if everything is translated to C# their productivity will rise and they have a lot of time to improve the code.
What do you think about this method ?
Is it a good idea to build a 'new' software completely on legacy code ?
modified 8-Jul-21 17:29pm.
|
|
|
|
|
You can go and rewrite the app all you want. No, you're not going to find a "conversion tool" to convert the code.
The language isn't going to make you magically more productive. There's plenty of stuff in the .NET BCL that will save you from having to "re-invent the wheel" in places in your code, but the real benefit to productivity is going to be how you write your new code and your design choices.
This is your opportunity to simplify your code-base and fix stuff in your original code by rewriting it from scratch.
|
|
|
|
|
sx2008 wrote: They think if everything is translated to C# their productivity will rise Straight up management thinking, an application badly written 2 decades ago, run through a n% successful converter and expect the users to be more productive.
For a start if you ever get it to compile (after spending a year fiddling with conversion issues) management will then shelve the "improve the code" effort (a never ending proposition if there ever was one) because if it works don't f*** with it!
Spend the time and redesign the application to meet current requirements and code from the start. If you have 4000+ forms I will guarantee there are improvements your user base would like to be made.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Everyone seems to assume that "legacy code" was always designed badly from the start. A good pattern is a good pattern (design). Only the tools change. I prefer a Dremel over a chisel; most of the time. Fewer rough edges in the final product.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Reread the first paragraph of the post, the OP states there are issues with the existing system.
It curls my toes thinking about trying to convert such a large codebase and betting it will work.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
It was more a rhetorical response to your generalization.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
sx2008 wrote: They think if everything is translated to C# their productivity will rise and they have a lot of time to improve the code
LOL...
No really LOL LOL LOL
|
|
|
|
|
Has this at the end worked? I think not, except adapting ported forms with implementing special logic manually.
|
|
|
|
|
In my workplace, we have an intranet website developed internally that we use for CRM. The data of our clients are shown there (MS SQL server is used as a backend to store data). The site has a limited search functionality at the moment (it'll try to match the text you type in one of the 3 fields that are indexed -company, staff contact, and director name).
I'm trying to find info about what would be the easiest method to implement a more sophisticated search (ideally that makes use of AI), like the one implemented by Google or Amazon on their website. It doesn't have to be so sophisticated, anything better than what I described above would do it. Ideally, the search should be able to guess what you're looking for based on your role, your portfolio of clients, and previous searches. It would be great if it could understand what you mean (i.e search query 'song la la la' that returns as result 'ATC -All around the world' on youtube. It would be great to implement vocal search as well.
But again it doesn't have to be that complex. Any info on where to look or which resources are readily available would be greatly appreciated. Do you know if there are (and what would be the best) search engines/AI libraries/API that are open source and that would fit this purpose? If this is not the right place to ask, on which other website or forum do you think should I ask for?
Thank you in advance
modified 17-Jun-21 12:07pm.
|
|
|
|
|
Maria Delpiano wrote: If this is not the right place to ask
Probably is the best place
Maria Delpiano wrote: what would be the easiest method to implement
Better be careful with that approach.
What is the size of your database now? And do you have actual reasonable data on the expected growth rate?
Otherwise this is what will happen. You will come up with something that works ok with 20,000 rows (across 5 tables) and then it completely falls over with 20 million rows (perhaps by locking up the database for a minute every time someone does the search.)
Maria Delpiano wrote: Any info on where to look or which resources are readily available would be greatly appreciated.
Following in google seems to return quite a bit of info.
predictive search algorithm
Maria Delpiano wrote: (ideally that makes use of AI),...It would be great if it could understand what you mean (i.e search query 'song la la la' that returns as result 'ATC -All around the world' on youtube. It would be great to implement vocal search as well.
Since you presumably have nothing now I would suggest just ignoring all of those ideas currently.
Maria Delpiano wrote: your portfolio of clients,
To me that is something you need to be very careful with. If you have user A with a set of clients X, I suspect you do not want anything associated with X showing up for user B (whose clients Y are different.)
And because of that restriction alone is it possible that you can only build your data based on one user with no sharing at all? Can you insure that a query by user A, if exposed to user B, even without the client name would not be a problem?
|
|
|
|
|
I would assume he already has client isolation already in his current, simple, search.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Hello,
It's same for 'inputs',
get if the type is good, and so the length,
for a enhanced search : history ( by client ?? ) or 'workers background' ( so filtering choice and Db feedback too.
If 'A' really go A*
if 'B' then 'go NOT 'A*'
modified 23-Aug-21 21:01pm.
|
|
|
|
|
How do you desired which of the architectural pattern to work with?
|
|
|
|
|
I reject the premise of the question.
|
|
|
|
|
Why rejecting what you should be able to deal with?
|
|
|
|
|
Experience and knowledge and what you have learnt about the business requirements.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
What if this is your startup and idea, and you've yet to write the business requirement? Your experience level is coming from a lot of books and youtube videos you have read and watch.
|
|
|
|
|
Tabah Baridule wrote: you've yet to write the business requirement Then why are you thinking about architecture patterns. Get you business plan and requirements sorted and THEN start looking into what platform(s) you will service and the different patterns that will meet your requirements.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
A pattern is where you're repeating the same block of code; it is now a pattern; your pattern. The fact that no one has used it before, or named it, makes no difference.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|