I have windows application Inventory management system and E-commerce site.i want to integrate both system to synchronize inventory at both side.If i sold one product from web then the inventory of windows application should be update and If i sold one product from windows application then the inventory of E-commerce site should be update.how to achieve this scenario??The Inventory data should be kept in xml formate on a domain and a from there that XML is read by windows application.So How to achieve this thing.and whole process is automated.please help.
Generally a database would be better suited to this as you'd have access to things such as stored procedures and transactions that would make updating things a lot easier. If you need to change something in one place then you would only need to update the stored procedure to update it in all places and you don't risk 'forgetting' to update the other place and you reduce the odds of a mistake going unnoticed.
Transactions on the other hand will help if there's any errors or situations that should cause a rollback to happen, for the changes to be undone and not committed.
If you insist on using an XML based inventory system you'd need to have a standardized way of interacting with the XML that accounts for the other end of the system already changing it. If the inventory is being updated because of new stock, but someone is trying to buy something from the website there will very likely be conflict.
It might be because the file is currently in use by a another program (the inventory management system adding new stock). You could always have the website/management system wait until the file is available for use, but that adds a lot of unnecessary delays and is far from clean.
If you absolutely have to use XML then there's a few good tools out there already that help parse and manage XML reading/writing:
How do I read and parse an XML file in C#?
Related
I know it maybe a mess in a logic I am thinking of, but the scenario is that I have a website which has 8 multiple copies same website same database schema but published on different places on the same server.
My problem is that I have about 50 stored procedures (per database), so what can I do to make maintenance easier?
Every time I modify one stored procedure shall I modify it at 8 places? Shall I change the web.config file 8 times each publish operation?
I am thinking about making a simple CMS system which I will store publish directories and on button click it will publish all project to selected directories, but still I have a problem which is the stored procedures? On first publish I am thinking of altering the whole stored procedures at first publish.
Please any suggestion is welcome, now I have only one copy and you know its hard to maintain after taking the decision.
BTW the website is ASP.NET Web Forms but I can port it to any new .NET web technology like MVC or .NET Core.
If you have full control over the hosting then a "multi-tenant database design" as suggested by Dai would be a better approach. However if the circumstances require multiple instances then you can do the following:
Store a version number in your database so you know which scripts have run and which haven't.
Script any schema changes (which includes any Stored Procedures), potentially seed data, and including a new database version number.
Store the scripts in a directory under the website.
Have a maintenance routine (manual or automatic), which runs any new scripts which haven't been run before, by comparing the version numbers.
I would like to create and archive a collection of demo ASP.NET web form applications that show projects with certain features in the sense "this feature can be implemented like this" -- to be presented to a potential customer.
Before the presentation, I would like to get the selected set of demo and install them easily to the notebook. Each of the demos will be "frozen". The target notebook is not the customer's one. It is one of our ones that is bring to the customer for the presentation. This way, it can be prepared in the sense that a named MS SQL instance with the fixed name can be ready, etc.
Can you share some experience with such situation? (I do not want to have marked this question as of opinionated; so please, if you have some explicit links to the related documents or explicit suggestions...)
Here are some other facts and initial ideas:
Each of the demo projects uses two databases: xxx_users (the standard ASP.NET authentication...), and xxx_application (and possibly xxx_external) where xxx is a prefix for the specific project.
The demo application is expected to be compiled (binary only, no sources needed for the presentation).
The Web.config files can use the local\SQLINSTANCEFORDEMOS in connection strings.
The SQL instance has a fixed name, fixed administrator account (like sa) and fixed password for the logging to the SQL instance. This way, it can be included in the Web.config files.
The sample data can be fairly big (not extremely tiny).
The application will use its own SQL tables in the xxx_application database.
The application will simulate the outer database that is accessed from the web application can be simulated by xxx_external database.
This way, I should be able to create and archive SQL backups of xxx_users, xxx_application, and xxx_external databases, plus the archive of the web app binary.
Have you ever encountered this situation? Is the approach reasonable? Could you share some better ideas?
I have a web site I developed for displaying the results of some data analysis work I did. It relied on ASP.NET for the front end and connected to a MySQL back end utilising Entity Framework and LINQ extensively.
I chose MySQL because I personally have used it in the past and like the database, but this resulted in some serious issues when I had to deploy it to a hosting provider (incompatible connectors, access rights, etc.)
I am now getting ready to redevelop and expand the site and I am looking for some advice to avoid the issues I had last time.
The new DB has to serve two roles. The first is to be a data provider for the charts that are the output of the analysis work. These tables are straightforward, almost flat files, with 10 tables. One table has roughly 200k rows of data the rest have aprox 1200 rows of data each. There are little references or queries between the DB tables, but there are a few. This data is updated periodically by a back end process and does not need to be added to or edited by the user.
The second role of the DB would be as a basic persistent store for a standard user management system. It would need to manage data for adding/ removing clients, user names, passwords, access rights. etc. No financial data or super secure data is involved.
What database approach would you recommend that would give me easy deployment and management at a web host and still allow me to use both Entity Framework and LINQ effectively.
Second, what tools/frameworks should I consider as I rewrite this system. It is very graphical and data focused. Presentation of charts and information is the key factor in this site. Are there any new technologies or frameworks that would add specific value to what I am doing?
A few notes. I am a one man shop and I maintain the entire system myself so I am less worried about enterprise level frameworks than other people. My focus is on the easy development and deployment of the site. Maintainability is also a key factor.
I am also an experienced C# developer, but new to ASP.NET and the web side of things. The first version of this site was a big learning experience. It was good, but I wasted an enormous amount of time on just understanding new technologies and approaches. I am very open to learning, but I can't afford the time to get my head around a complete paradigm shift.
I am looking forward to your thoughts, thanks.
Doug
The natural choice would be SQL Server. I'd guess by your description that you are way under the maximum space limit of the SQL Server Express edition. I of course supports Entity Framework and the drivers are part of the .NET Framework, so no problem with third party assemblies here.
This will also open up the possibility to host your app in the cloud (Azure) later on, because SQL Azure in fact is a Microsoft SQL Server, so there is no overhead in supporting that.
Regarding user management - ASP.NET has this all build in (Membership, Role and Profile provider) and also a SQL Provider for which default tables are available. So you don't have to design your tables by yourself and it runs very naturally on SQL Server.
We are building a jobsite application in which we will store resumes of all the candidates, which is planned to store on file system.
Now We need to search inside that file and provide the result to the user, we need to provide that what is the best solution to implement text searching.
I have just tried to identify it and got some reference like IFilter (API or interface) and Lucene.Net (open source), but not sure that is it a right solution.
In initial phase it is expected to be around 50,000 resumes and it should be scalable enough if number increases.
I just want some case study or some analysis or your suggestions that which is the best method to handle this requirement (Technology ASP .Net)
Thanks
You can use Microsoft Search Server. There is a free version, so you can try it before buy it (or never buy, if it meets your requirements).
If, later, you do want to integrate that documents into a Sharepoint portal, Enterprise Search can also integrate with it.
One possibility would be to use the FILESTREAM feature in SQL Server 2008, combined with database-level full text index / search.
That would allow you to keep the files in the filesystem, while also providing transactional integrity and search.
SQL Express supports FILESTREAM, and the 4GB size limit doesn't apply for the files (although it does apply to the size of a full text index).
This might be naive since I'm unfamiliar with off-the-shelf search products but if nothing pre-build fit the bill I would build a simple service that crawls and indexes (or several instances to crawl different directories to increase speed) and updates a database. If the files were accessed regularly you could build a layer of isolation to prevent collisions.
Rodney
Im in the middle of developing a product that i will hopefully be attempting to sell towards the end of the year and i was just wondering what the best way to handle the licensing is.
My Product is going to be a downloadable asp.net web application and at the moment looks like there will be a free version and a premium version.
Im thinking about using serials that i can keep track of on my end, but the question is, Whats the best way to restrict the free version and have the application 'know' its premium? or should i just have 2 branches of the same product instead of trying to do it all in the 1?
Im planning on making a web installer for the product where the user can put in the serial and it will determine what version they have.
you could have an encrypted license file that your system checks for every so often which tells it what "version" it is. You can dynamically restrict functionality based on that.
This allows you to keep a single code base, and also make it impossible for the users of your system to simply change a setting in a config file and get your entire system for free.
This is going to be hard to do with a web app.