titarenko / clientmanager Goto Github PK
View Code? Open in Web Editor NEWLite CRM
Lite CRM
Since you were so fast, and implemented more than required in #11, here is a new task. Refactor MailMessageConverter class so it contains only one method that receives Input.MailMessage and returns Entites.MailMessage. Consider injecting IRepository instance through constructor and then use it in aforementioned method for retrieving of relevant Persons by their emails. One more thing: you must write unit test for this class (consider creating mock for IRepository).
Consider http://pastebin.com/ghNWgpQq as example (and remember our lecture).
Go to http://pastebin.com/u/titarenko for snippets of data access implementation. Make sure you understand what are going there. We will additionally have conference call where everyone can ask any related questions. This is high priority issue and it will be closed when everyone clearly understands data access implementation we will use.
Make navbar fixed, be sure, it does not overlap page contents.
Start with email parser implementation. At the moment it should only associate email message with client and employee. Initially I assume that Client and Employee entities will be created, then you'll do lookup in storage using info extracted from email and then you'll associate these entities with mail message instance by filling up corresponding properties. If Client or Employee doesn't exist, you should create one. Please, contact me if you need more details.
Add RoleValue int type.
Role property get method must give PersonRole with value that equal RoleValue.
Make sure we do not have <div ... style="..." in our HTML markup. If we do - move these styles to Site.css.
If you use navigation property (For example Inquiry.Client) and doing query, make sure you include needed reference properties (For example repository.Query(x => x.Client).Where ( x=> x.Id > 10 ))
Make sure we have links to our pages where lists of entities are displayed: clients, employees, dashboard, maybe something else. Currently there is only "Clients" link there and this is sad :(
Change name for GetMessages method to GetNewMessages or GetUnreadMessages (consider pros and cons of each new name). Make sure documentation is updated as well. Also take note that this issue can interfere with #5.
Full name should be displayed at very bottom (at the right) of the inquiry card.
ImapClient from Ae.Net.Mail has event MailMessage or something like this. Investigate how to use it and create simple implementation of our IEmailClient which will listen to this event and immediately raise our own MailReceived event. You can take AeEmailClient as example (initialization, disposing, etc).
Take a look at Inquiry entity, apply this refactoring.
Person should have identifier, first name, last name, creation date (not birthday :) but when they were added to our system), and of course email. We'll extend properties list later if needed, but at the moment that's it.
Create home page describing project, mention that this is Binary Studio Academy 2012 project, use https://cacoo.com/diagrams/FRjctIXMueEXkxjJ diagram (embed it using "Link" menu - look for "HTML to embed the image and paste the site").
Create editor for Client entity. It should be accessible via link located on page with list of all clients (each client record should have "Edit" button - actually link styled as button). You can take Inquiry editor as example.
Sender should not be editable in this editor - logically inconsistent.
This one should be initially equal to originating email body.
Implement inquiry editor. Consider http://twitter.github.com/bootstrap/base-css.html#forms before starting with this.
Link should be styled as button. Click on it should lead to mail details page.
Analyze usages of references (use ReSharper: open References, then right click on certain reference, finally "Find Code Dependent..."), then remove unused packages using NuGet dialog (right click on references, then "Manage..."). Also update jQuery to latest version (again, using NuGet) and remove unused packages related to scripts (I mean Modernizr and so on).
Enable employee assignment for inquiry on dashboard page. When employee is assigned inquiry should change status to "In Progress" and page should be reloaded to reflect recent changes.
Create AppConfiguration where use ConfigurationManager's (http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx) AppSettings to retrieve values. Subsection should be represented as prefix with dot for AppSetting's key. For example, add key="MailClient.Host" value="localhost" - here "MailClient" is subsection name and "Host" is key within this subsection. Also try to implement generic GetValue, you can use something like Convert FCL (Framework Class Library) class (http://msdn.microsoft.com/en-us/library/system.convert.aspx).
Probably someone used suggestion of ReSharper to use IIdentifiable from TeamFoundation API. This is completely wrong! We need to use our own IIdentifiable which should consist only one property - Id with type int. So replace wrong usages with correct ones.
Do googling before starting implementation - surely someone already has solved this task before (and you can find nice and easy-to-use library).
Create additional MailMessage class in Input namespace. It's role will be transferring of data from IEmailClient to another service, which will create Entities.MailMessage. Reason - Input.MailMessage represents Sender/Receivers using MailAddress and Entities.MailMessage will represent them as Person instances. Do necessary refactorings (IEmailClient, AeEmailClient, tests, maybe something else).
Create page where user can see full list of clients. Create controller if needed (I suggest something like ClientsController). Make sure #13 is completed before starting with this.
Go through tests and change (not necessary all, but indeed it'll be great if all) usages of new Mock<...>... to code which uses NSubstitute, manual object creation to code which use NBuilder, and Assert-style assertions to code which use Fluent Assertions.
I suppose DashboardController was created without employing TDD principles. That's bad :(
Fix this situation and please use TDD approach further.
Create controller responsible for operations with inquiries. Implement first such operation - rendering a page with inquiry details. This page should contain details about both inquiry and related email (from which this inquiry was created). If Inquiry entity is absent, create it in ...DomainModel.Entities namespace (start with simple list of properties, let's say, Issuer and Subject). Make sure #13 is finished before starting with this story.
Create page where user can view entire mailing history with client. I suggest use of ClientsController/MailingHistory controller/action for this. Make sure #13 is completed before starting with implementation.
It looks like typing date by hand is not funniest activity in the world, so let's employ jQuery Datepicker http://jqueryui.com/demos/datepicker/ as well as MVC3 editor templates http://coding-in.net/asp-net-mvc-3-how-to-use-editortemplates/ to provide such great feature as calendar for our best in the world users.
Fill readme with project high level overview, mention that this is Binary Studio Academy project.
Go through existing code base and review code written by your collegues. Make sure .Query() method is properly used, tests are fine and so on.
Make sure it looks like https://github.com/titarenko/ClientManager/wiki/Clients-List-Page-Sketch.
This one should be initially equal to email subject.
Create MVC3 project for further development of web UI.
Create page and make sure navbar is updated with new link.
Since Entity Framework (at least < 5.0) is so weird that it doesn't support mapping of enums (even as ints!) and we need a huge workarounds (as expression rewriters, or enum wrappers, or maybe something else), let's simplify things and use constants. Example is here http://pastebin.com/wWBXQbaF.
Consider http://msdn.microsoft.com/en-us/magazine/cc164015.aspx before implementation. Try to write integration test (place it into corresponding Tests assembly). If you have any questions, contact me.
Make sure we have page where all employees are listed. Use https://github.com/titarenko/ClientManager/wiki/Clients-List-Page-Sketch as example of how it should look like.
Implement missing parts of view model, and controller logics for obtaining them. Also make markup for it (you can use this example http://pastebin.com/CdkfY32P).
Go to http://pastebin.com/u/titarenko and bring all entities listed there to our project. The best place to put them in is BinaryStudio.ClientManager.DataAccess.
Create editor for Employee entity. It should be accessible via link located on page with list of all employees (each employee record should have "Edit" button - actually link styled as button). You can take Inquiry editor as example.
Go to https://cacoo.com/diagrams/WfA677QxYOCW5oIB and finish diagram according to our hand-written sketches. If you need access, write me an email - I'll provide you with it.
Remove this controller, make sure Dashboard is set as controller in default route.
See http://pastebin.com/98YjWhtv. Make sure it went to .Tests project.
Implement mailing history action, view model and view. Sketch of this page is available at https://github.com/titarenko/ClientManager/wiki/Mail-History-Page-Sketch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.