⬆️ ⬇️

ASP.NET MVC Lesson F. Work as it is

The purpose of the lesson: the final lesson on creating an application. Writing technical specifications. Creating a database. Rename webTemplate. The use of scaffolding. Admin panel Main site. Tests



The main thing


This is the final lesson, and here I am a bit away from specific programming and reflect on the work.

Programming is work, it is a profession, it is creativity. When I was studying at university and walking with someone on the way home, we often argued that it was better than Windows or Linux, Delphi or C ++. Then we could not sleep at night to rewrite beautifully the construction of a semantic tree for the compiler. We studied prolog, lisp, finite automata, data structures. We learned to see the beauty of the quick sorting of Hoare realized in the Lisp. IN!:

(defun quicksort (lis) (if (null lis) nil (let* ((x (car lis)) (r (cdr lis)) (fn (lambda (a) (< ax)))) (append (quicksort (remove-if-not fn r)) (list x) (quicksort (remove-if fn r)))))) 




But now I see programming as a service. Like something for which I get paid money. I have been freelancing for three years now. At the beginning of my work as a freelancer, I programmed not only the web and not only on asp.net mvc. There was php on ZendFramework, and writing modules for calculating strategies for trading on RTS on Quirk.

')





But then he singled out the asp.net mvc direction and began to develop in it. The global strategic task was the following: “Increase development speed”. Development speed is the most important parameter. First of all, we save our time and also adhere better to the deadlines. At the same time, I didn’t want to roll into conveyor development, where the programmer does the same trite things over and over again. I singled out for myself the method of accumulating and creating the tools that are almost always needed.



This is how the webTemplate came about. In essence, this is a template for all my projects. He himself is the fourth version. This is my main product. But first I will talk about the principles of relationships with customers, then about the rules for drafting the technical specifications, then about the mode of operation. And at the very end about the webTemplate.



About principles


Customer-employee relationships always cause a lot of controversy. That the customer has offended, the employee is wrong. Freelance is still a swamp, and often the customer is already “experienced” and during the first conversation informs that “there are no prepayments, for you have seen it!”. Here are my principles:





Technical task


The technical task is your everything, it is 70% of success. The terms of reference should answer the following questions and consist of the following parts:





Thus, TK declares three things, the most important:



Skipping this link, you initially ruin the project. You are mistaken on all three points, on the volume of work, on time, on cost. Try to avoid this.



Yes, and more importantly: TK should not be large, ideally - up to 20 pages. Do not detail too much, otherwise the customer will not read it, and will insist on using his document. Your document should be better. It will be better, because there will be a line with the price of the project. But do not overdo it with him.



I will clarify once again: TK uses one of the most important principles of interaction - the Declaration Principle. It is written “we work from 10:00 to 20:00”, the client came at 20:10, and you should not explain why you cannot serve them. But at 19:50, closing the door in front of the client’s face is a violation of his own rules, his own declaration.



TK approved. You can get to work.



Base structure, webTemplate and Scaffolding


Running through the technical task, I write all the entities separately in the file, I evaluate the connection. And then I describe them in the database. It takes a lot of time, up to 8 hours. After TZ is the most important part of the project.



After that, I copy the webTemplate project and rename the webTemplate -> [new project name]. It takes about 30 minutes.



After that, in a new project, I launch Scaffolding for the required tables ProviderRepository and Model. You can immediately make all the commands and copy the Package Manager Console to start the process and go for tea.



Next, in the ViewModels I add the necessary SelectReference, remove unnecessary fields and add the necessary attributes from the ManagedAttribute and run the Scaffolding Controller.



After that, correct the project so that it compiles, and work with the admin panel.



Further, starting from the main page, I do all the other modules day after day.



Own rhythm


Have you ever had such a thing that on Monday you come still broken, and on Friday you leave already “dead”, and the goal of Monday is to live until Friday. And the goal of the month is to live up to salary. Or, after working at night, you then go "killed" for a week.

After watching myself, I noticed that my weekend was in the middle of Friday, and if I worked seven days a week, the fuse ended much faster. And all sorts of chores (for example, you need to go to the city) killed the whole working spirit and the whole day.

In addition, customers of projects that I support, almost constantly turn to me with edits. And they need to be done. And sometimes there is no time for that.

And I made a weekly rhythm that allows me to keep up with time and plan more accurately. It starts from Sunday:



The bottom line is that on Monday I know that it will be hellish Tuesday and tune in to it, but I am amused that I have a day off on Wednesday.

Further strength in the declaration, everyone knows that on Tuesday I can not answer the call. That their edits will be made on Wednesday or Thursday. That, most likely, the next large volume of the project will be loaded on Tuesday evening, but errors will be fixed on Thursday and Friday. Even relatives try to adjust to this schedule.



Search your rhythm, realize your ideas.



All sources are located at https://bitbucket.org/chernikov/lessons

Source: https://habr.com/ru/post/176139/



All Articles