|
EF is an ORM. That pretty much sums it up.
|
|
|
|
|
If that is true that you forgot one of two things when using EF
1) you did not call 'SaveChanges()' on your DbContext.
or
2) Your EF configuration has the change tracker disabled.
There is always the possibility that something is just plain broken - like you are modifying properties which are not mapped.
|
|
|
|
|
I think the goal of EF (and any ORM) is to abstract away the detail of the data storage implementation. If you are still thinking in terms of tables and SQL then you haven't abstracted enough
|
|
|
|
|
Duncan Edwards Jones wrote: I think the goal of EF (and any ORM) is to abstract away the detail of the data storage implementation. SQL is already an abstraction.
Duncan Edwards Jones wrote: If you are still thinking in terms of tables and SQL then you haven't abstracted enough If you wrote a DAL for your SQL, add this comment on top: redundant leaky abstraction.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
But neither are enough of an abstraction if you still know how and where the objects get stored.
|
|
|
|
|
Okay, I have a need for a pretty generic Directory Monitor utility.
It will run as a GUI and as a Service. The GUI is for configuring and testing.
The service will run on the active configured items (multiple).
I am stuck on a design implementation issue. It is NOT that important to me,
and that creates the problem. The usages of this "DirMon" are typically to
detect a file has been updated/saved, and to force it into source control.
Furthermore, we use a syntax that normally does not care about the individual
file, it handles the whole directory structure.
Think: Management Folders Sync'ed with other managers through version control.
Not developers.
I face 2 challenges. The first is that I want this to be "better" than that,
because I am so close to a VERY USEFUL end user type tool. The second is that
the process ReadDirectoryChanges() and GetQueuedCompletionStatus() have 3 issues.
1) When overwriting an existing file, I get 2 notifications for that file
2) They can (and will) become lossy if overwhelmed with changes, especially if I
cannot keep up with them.
3) I cannot have a new process start while an existing one is finishing
My quick hack was to simply add a timer in between the notification and me firing
the event. This is far less than a great idea.
After thinking about it, I realized this is a real problem. I am probably missing a
well accepted Design Pattern...
So, that is my question... How would you design this last piece, so that as the
various events fire, that I could keep track of various changes and make sure that
they were dealt with?
[I am willing to add a Flag for the user to choose if they NEED individual or summary
events, so I can know. If summary, I will use my current approach where I just keep
resetting the timer until things calm down. But if they need/want individual events,
what to do?]
Thanks in advance...
|
|
|
|
|
Monitoring a folder with or without its sub-folders is a pretty common task. Many developers experienced the oddities of System.IO.FileSystemWatcher , and you may find some tips & tricks or articles on its mutliple or missing events. Or did you write your own FileSystemWatcher? Note that a to narrow schedule of the polling task may cost to much resources.
add a Flag for the user to choose Are you sure any end user - who is not a developer, you told us - is interested in that? I.e. do you expect them to understand your underlying technical solution? I doubt that. They just need to know if there are files to by synced. By the way, why don't you do that automatically?
|
|
|
|
|
Okay, I am doing this in Delphi (not .NET), so no System.IO... stuff..
Even if I end up configuring that flag for them myself, setting it up on their machine, I am good with it.
Bernhard Hiller wrote: They just need to know if there are files to by synced. By the way, why don't you do that automatically?
That is what I am building for them. It will be configured once, and run as a service. Whenever they save, it will do the appropriate sync. Which, for different clients could be Mercurial, SVN, etc. I am NOT giving them a tool to see what has changed (that is useless, they know what changed, in general). They just forget to Jump into something else and commit. In some cases, the action is triggered by generated reports to a folder.
Since 99% of the use cases don't care about specific files, I will simply ignore that case. I will let it run, and see if a Version 2.0 is needed to handle more.
I think, sometimes, I get in my own way, trying to cover EVERY possible use case...
Thanks...
|
|
|
|
|
The Win32 API you would use is FindFirstChangeNotification[^] and associated api's.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Kirk 10389821 wrote: They can (and will) become lossy if overwhelmed with changes
People are updating these files and each person has their own files - why would you lose a notification?
Kirk 10389821 wrote: that I could keep track of various changes
When I edit I like to save intermittently just in case the power goes out. How are you going to deal with that behavior especially if the file is large?
Kirk 10389821 wrote: Management Folders Sync'ed with other managers through version control.
And your comments all seem to be about putting the files into the service, but what about getting them out?
As a user it is going to annoy me to no end if my system starts 'pausing' every 5 seconds every time I stop typing for just a millisecond. And it probably absolutely useless to have only piece of some update added to version control.
So a timer seems like a much better solution. Every 5 minutes see if a file has changed more than 5 minutes ago but less than 10 minutes ago. Then sync. And at the same time check for updates to existing documents.
|
|
|
|
|
i wanted to know what is actual in business layer it is only properties or some logic over there
|
|
|
|
|
|
Business layer can be placed in two locations 1. On client side and 2. On server side.
Client side business layer will does all client side logic before sending to service (think the application has both Client and Service) and Server side business layer will deal with logic that is after retrieving data from db or before saving to db.
Layer is nothing but a code/project to do certain actions. Also remember a Business Layer must not have any UI related things. If it has, then it is not a business layer. We have to move those UI related things to some other place most probably to Presentation Layer.
Also on the other hand, if we have only one Client which deals with DB, then there will be only one BL (a business layer) which goes all logic in here.
Hope you understand.
Regards,
Ganesh
|
|
|
|
|
|
No problem Djay...
Regards,
Ganesh
|
|
|
|
|
The business layer defines the rules of the business. So for an accounting application you would expect to see accountancy rules being defined such as VAT rules, stock control rules etc. So yes, you would expect to see logic (rules) being defined in the business layer.
One of the goals of n-tier design is that these rules should be completely encapsulated so that they can reused by other applications e.g. your company web site may use these business rules as well as your desktop application. For this reason it is common to find business rules implemented as services such WCF services in an SOA architecture.
|
|
|
|
|
Hi
Not sure if I am in the correct group.
In the 1970-80s the 4 bit TMS1000 was used in lots of games, Speak and Spell, and consumer products, microwaves etc, including a model railroad controller called the Hornby Zero One.
Would like to upgrade slightly the code for the controller by adding some more locomotive addresses. Has 16, need to go to say 64.
Apparently there is a way to download the existing code thru a test port, does anyone know of this ?
What I would like to have done is to download the code, make amendment for the number of addresses and then upload onto a modern 8-bit chip.
Is this reasonably simple !! Is there someone out there who has done this?
Thanks
Charles Harris
|
|
|
|
|
Trouble with your choo choo, Charlie?
The Hardware & Devices forum might be a slightly better choice. http://www.codeproject.com/Forums/186301/Hardware-Devices.aspx[^]
There are likely more engineers over there too.
Off-hand, it doesn't sound easy, and it might help if you could provide links to what information you have found so far.
E.g. "Apparently there is a way to download the existing code thru a test port" where did you find that information?
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
what is ASTA VoIP for SIP? and why it is used?
modified 29-Jul-14 8:26am.
|
|
|
|
|
Voice over IP[^], for SIP[^] clients. ASTA is merely a brand-name - apparently they wrote an implementation.
Member 10978201 wrote: and why it is used? Follow the links and find out
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
can it support to Dot net 4.0 framework
|
|
|
|
|
There's various implementations, and yes, some will be compatible with .NET. Whether ASTA's implementation works with .NET 4 is something that you should ask them. From the Google result it appears that there is a COM-version.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi All,
I have a 10 year old classic .asp app which is a multi tennant SaaS. Running on IIS 7.0 with MS SQL Server back end.
When I started this site / app in 2003 it was somewhat ahead of its time for the industry it was serving and had limited success partially because of some reluctance for companies to run their business entirely on the web. However, I was able to grab a decsnt amount of customers (who still use and love it) but ultimately this business fell to a "part-time" effort for me while I took a full time job in IT management. Over the years I have maintained the original customer base but have not put any effort into building new business.
It's time for 2.0...lol as 10 years is a long time for 1.x on a classic .ASP platform
My current customers just will not go away, and I sense that I could grab a bunch more if I modernized this app. I am looking to modernize the UI, increase performance and allow for easy integration with third party APIs for QuickBooks, etc. as well as possibly extend to mobile apps for iPhone / Android.
The site is a transactional inventory data app where the main tables get between 75-100K records per month with a few hundred users. It currently contains about 125 .asp pages. It is multi-tennant and all customer-specific variability is managed via database configuration and some conditional coding based on session variables set by config data in the DB. The functionality is mostly basic data entry, html grids and querying / reporting and exporting data sets to excel. We use Crystal Reports XI for some reporting,charting etc. I do have a need for more robust label printing (currently using Crystal Reports) have worked with 'Nice Label' on other projects but would be looking for options here.
I have started looking at MVC vs. .Net forms but would consider anything which will be supportable for the next 5 years. I have done some .Net but skills are stale however I do know .asp / vb and java script and SQL well and have been maintaining this app myself for the few years. Would like to be able to learn and be able to do some design/coding/maintenance myself once the framework is in place. so any platfroms which might lend themselves to my cirrent environment would be great.
I like the looks that can be accomplished with HTML5. I recently subscribed to quickbooks online and love the look and functionality of that site which is based on HTML5, Javascript, DoJo. See link to the slide deck link at bottom which describes what technology Intuit deployed.
I need help and direction on overall architecture selection. Wondering if someone can point me to some resuources where I can answer some basic questions and get a general assessment of what types of platforms would work well.
Also willing to pay for consulting time to work this out. Sorry for the novel.
Thanks!
MHAM99
https://docs.google.com/presentation/d/18Ho1IF8CsZzO1B9N2AJth615nsE2KK-TGDFCXCYB7ks/edit?pli=1#slide=id.ge7337632_2_153[^]
|
|
|
|
|
Hi mham,
yes running an application on old technologies will not only degrade the application performance also your application cannot compete with new technologies. As long as your clients are happy, you will be happy, but once they ask you with latest technology. Yes, you need to do that.
You are on the right track for developing with right tools like MVC. Or else you can do one more thing like have two different layers like client and server and write a web service separately where you will have all db related logic.
Its like a Client Server architecture. So if you develop a separate service. later you can use the same service in your android, iOS or windows or some other service. So it becomes like a "Write once and Use else where".
If you have a large data sets which will degrade the application performance, there are many alternative ways that you can do in order to increase the performance of application with less effort. One good thing is Paging or Data virtualization. Using AJAX based controls, queries and now a days there are lot of java script frameworks available and can choose any one of them to implement the best for your needs.
Well, I don't know MVC so I can't help on it, but if you asked me on how to do with classic ASP.Net with Sql Server and WCF service then I can help you.
Regards,
Ganesh
modified 14-Aug-14 7:43am.
|
|
|
|
|
Are there any schools of thought on whether it is better to code a new design from the top down, or the bottom up?
Top down means writing the highest level code first, then filling in the details later. Bottom up means to implement the low level code first, then tie it all together later.
Which are you more likely to choose?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|