Best way to manage pre-defined logic & data in project? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
This might be confusing question but I don't know which is the better way to ask my question.
I am developing a software which has predefined data/logic in some scenario.
For example:
For mails, there are predefined list of email addresses to send in CC or BCC.
For using specific kind of email template in specific scenario is fixed on predefined condition.
I want to manage this kind of predefined logic/data separated in my project. So if there is any change in that data, I can easily change it from single place. For that I have many ideas in my mind. Suggest me which would be better. And if you have any other idea please share with me.
Make a class & store predefined data in variables. or use methods for logic.
Define all predefined data in web.config

For emails you can have groups /ids for scenarios and map those ids in database.Then at runtime just pick cc and bcc ids from database. If database is much of overhead , store them in some xml file .This way any change would be required in database only and code wont require much change.Same goes for email template.

Related

Calling another language with MQL5 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I would like to scan an economic calendar (and in a second step possibly a news source) like this one for use in MetaTrader/MQL5. I guess I would need another programming language than MQL5 for that, possibly (but not necessarily) C#? (How) can it be done in principle?
Thank you very much in advance!
You can check whether you can access that web page through WebRequest() function available in MT4/5. Alternative way is to write a DLL (or to find one) and access the link above through the REST api (but it doesnt make sense as WebRequest provides it) or somehow else. The easiest way is to check all calendars you may find (myfxbook, mt5.com, fxfactory) and find the easiest page to parse with MT5 methods, then try to collect data and process it. If your skills include some other languages, it might make sense to collect data with REST and then parse it with Jsoup/soup/beautiful-soup (the library that is designed for your language) - that will help with tests (to clear the data faster), and WebRequest() for live.

Generating forms that use an MVC Web API [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am developing an interface that customizes and generates forms for customers to use on their own site. When a user logs in to the interface, he can create a form, add or remove fields from existing forms, and the system will generate the file.
I want to know what's the best approach for doing this. Making these forms independent and just use HTML/Javascript? or have them part of the overall MVC solution inside a Views folder so it can have server side code?
Probabily the best way is not to store the entire form, but having some metadata that describe the forms, then generate the gui dynamically. There are many ways to doing this, it basically depends on your skill, and your specifics, personally im developing something similar right now and i chose Angular2.
Here an example:
https://angular.io/docs/ts/latest/cookbook/dynamic-form.html

How to store common data inside the application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
We have configuration data stored within the tables like casestatustypes with columns such as statusid, name, description. How to store these kind of data in the web application, instead of hitting the database each time for retrieving the statusid.
You use a technique known as caching. Basically, you build an in-memory copy of the data that you use for retrieval purposes. When you start the application, you pull from the database to create this cache. When you do an insert, update, or delete; you do it to both the cache and database.
Its easy enough to implement yourself, and there are several good libraries out there (Microsoft even has one in Enterprise Library http://msdn.microsoft.com/library/cc467894.aspx).
Gotchas:
If the data set is large, you'll want to implement a caching strategy that doesn't hold the entire dataset in memory (libraries are useful for this).
Since its a web-app, you need to make sure the cache isn't going to be re-created for each session.

C# Saving Objects [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to be able to save several objects which are linked each other. Idea is to have a Client object, Project object, Work object which will interfere each other. All data within will be as string and int. Everything will be joined in Record Object in which I will choose values from mentions object plus adding new entries.
What would be the best way to save all into a file - serialization? Is it possible to do it with some kind of data base? So far it is recorded in Excel table.
Serialization is fast and compact way to do it, but with linq you have XML and XML serialization which is closer to what you are looking for :
http://msdn.microsoft.com/en-us/library/bb387098.aspx
To go further Linq was created to simplify database queries so by default you will be able to access any ODBC compatible database (sqLite MySQL etc...)
FYI : You can Edit XML and XML scheme with Excel (if that's the kind of things your're into)

Display live scores [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am planning to design a website which displays the live scores of matches(NBA, AFL) etc. I would like to get scores, store them in my database and then display in my website. How can I accomplish this. Thanks in advance.
Thanks,
Sandeep.
Well first you need to decide how you're going to get the data. Is there a webservice that you can query? A document/webpage you can parse to get the information? Are you going to write a speech recognition device to interpret results from the radio or will you type it in by hand.
Then you need to get your database up and running, and whatever is reading your data (maybe it could be a windows service) can write the data into the database. Something like SQLExpress is quite good to try out.
Once you've got that you'll need to decide on your technology, ASP.NET or Silverlight are some good examples. You'll want to create some controls and then databind to the results from your database, which you could obtain using SQL expressions.

Categories