Anda di halaman 1dari 4

Support for ASP .

NET MVC in MonoDevelop


Student: Piotr Dowgiallo Contact: sparekd@gmail.com March 29, 2012

Abstract

ASP .NET MVC is a technology gaining more and more popularity due to its ease of creating modern and well-designed web applications. While its simplicity is provided by the powerful framework itself, during the development process robust IDE is also of paramount importance. MonoDevelop has only a basic support for creating ASP .NET MVC solutions. The goal of this project is to improve the current level of support so that all web developers using MonoDevelop could create their applications in a more ecient way.

Project motivation

At present, the level of support for MVC applications in MonoDevelop (MD) is limited. Project templates and conguration les have not been updated to the newest version of MVC. Razor templates, which make the whole website creation process much easier and cleaner, are not available. There is neither syntax highlighter, nor code completion module for cshtml les. Many other changes and improvements in GUI can be introduced to MD in order to make the creation process simpler. There is a strong motivation for writing new add-ins and improving the existing ones to provide better usage for developers. For myself, this project is a great opportunity to make my coding skills better, get familiar with good design patterns and improve communication skills. As web development in ASP .NET MVC is among the main interests of mine, this project can rene my understanding of the platforms details while learning from experienced .NET developers.

Project overview
1. Problems analysis, code investigation and information gathering. I would like to get familiar with existing code, especially modules that I am planning to expand or derive from, and get deeper knowledge about syntax highlighting and parsing in general. 2. Planning each tasks details and discussing them with mentor and community. While various tasks seem easy, there are some details, especially related to Razor syntax, that need more analysis and good architecture plan to be eciently implemented. I will probably have a few questions to my mentor and the whole community which should help me prepare a good plan of Razor related features. 3. Implementing add-ins: Project templates GUI elements Razor syntax highlighter and code completion engine 4. Testing and bug xing. 5. Documenting my job - preferably on a blog.

The proposed project consists of the following steps:

First two steps will be carried out in the community bonding period. Detailed description of implementation phase and its deliverables are presented in the next section.

List of goals and deliverables

The main goal of the project is to create numerous add-ins of dierent complexity related to ASP .NET MVC development. There are several major tasks to accomplish. Their details are presented below: New project templates with correct references and web.cong les so that MVC 3 projects could be compiled and run without any additional hacks. This task includes providing templates to create both empty solution (with basic folders structure) and web application solution (with views in Aspx or Cshtml format) with additional les: default controller and view, layout template and ViewStart le, unit test project, etc. The new templates will be based on the existing ones. Improving existing and adding new GUI elements that could make the whole process of creating MVC 3 application easier and more ecient. This includes adding an option to new view dialog that enables Razor view creation, adding a command to switch between controller and corresponding view le, improving the process of creating views by introducing an option to add a view from controller le, adding Controller sux to the name of newly created controllers by default. This task may consist of other minor improvements and bug xes related to MVC, which could help MD get more developers-friendly. Razor parser and syntax highlighting integrated with existing C# and html parsers. As I was informed on monodevelop mailing list, this task is challenging. However, I strongly believe that, with the mentors help, some good results may be obtained. At least syntax highlighter, which seems to be the easiest part, should be created during the GSoC timespan. Given the fact that Razor parser has been open-sourced, it is now possible to implement a version integrated with MD using less time, which may be used in turn to focus on code completion part. I have already looked through the existing ASP and HTML parsers. As for code completion, I think that the best idea is to create a new module which would identify html and C# regions and defer code regions to the existing completion engines, but this needs further detailed analysis to make it correct and ecient. The rst two out of three tasks should be done by the mid-term evaluation. The Razor part, as it is more complex, needs more time to be completed, so it is the only task for the second half of GSoC, and should be nished by the nal evaluation deadline.

Timeline

I will make this project my primary task during the summer and work about 30 to 40 hours per week. Below I present an estimated timeline with details about all the steps needed to complete the project. The timeline takes into account the ocial GSoC 2012 schedule. April 20 - May 21 During the community bonding period I will embark some preliminary steps to get familiar with the code and community. The primary tasks are: Preparing Windows and Linux environments. Detailed analysis of existing sources, especially the AspNet and AspNetMvc addins as well as existing code parsers, including Razor parser provided by Microsoft, and completion modules. Playing with code by xing some minor bugs. Proposing detailed architecture for creating Razor highlighter and code completion engine. Reading mailing lists and articles for developers, especially those related to extending the project pad and creating new project templates and commands. Discussion with community on proposed solutions. May 22 - June 8 Because of the end-of-term examinations I will not be able to work on a full time basis during this period. However, I think that rst deliverables can be completed. The primary steps for this period are: Improving existing projects and congurations templates to support the current version of MVC by correcting the existing references and web.cong sections. Adding default controller, view and layout les to ASP .NET MVC Application Project template and (optionally) additional conguration sections in web.cong le. Providing an option to add a unit test project while creating an MVC Application. Providing an option to create Razor views instead of ASPX ones. 2

MILESTONE 1: New project templates that fully support creating MVC 3 applications with Razor views. June 9 - June 22 During this period several helpful GUI add-ins will be completed. The steps needed are: Changing the existing new view dialog to support Razor views creation. Creating a new command to switch from controller le to corresponding view and vice versa. Creating a new command to add a view from the specic action in the controller le. Any other improvements or xes that community nd essential for ecient MVC development. MILESTONE 2: Several GUI add-ins that make the creation of MVC application easier and more ecient. June 23 - June 26 This is the time for thorough testing, xing bugs, improving code, making up for potential delays and elaborating deliverables created earlier. June 27 - July 20 During this period the main goal is to create Razor syntax highlighter based on the open-source parser implementation provided by Microsoft. This parser will be integrated with the existing MonoDevelops logic, i.e. highlighting and completion systems, and will be written in such a way that it could simplify creating code completion engine. July 21 - August 16 The code completion, which is the goal of the last period, is a challenging project that involves considering many dierent conditions, so I cannot guarantee that it will be fully implemented by the nal evaluation deadline. I think though it is possible to at least start with the implementation and create some working code. For the time being, it is dicult for me to correctly estimate the time needed for doing each individual task thus I do not break this long period for smaller ones. All the details essential for creating high-quality result will be set and discussed during the community bonding period. MILESTONE 3: Razor syntax highlighter and code completion engine. August 17 - August 24 Bug xing, code reviews and refactoring. This timeline was based on my personal assessment of individual tasks complexity. However, if you think that my estimation is too optimistic or too restrained I can adjust them accordingly to your needs and priorities. I also assume that every period should be preceded by a brainstorm phase during which my ideas are discussed with the mentor and community. There is always a chance that something may go wrong or take more time that I expected. In this situation we could discuss postponing the milestone or narrowing the scope of the specic task.

Background

I am studying computer science at Gdansk University of Technology in Poland where I have already gained the engineers degree1 . During the last years I have obtained broad knowledge of software development, and got familiar with numerous programming languages, libraries and environments. I have created several projects in Java, PHP and C/C++, but my programming interests are centered around .NET platform and related technologies, such as WPF, Silverlight and Entity Framework. I am a uent C# programmer with experience in developing ASP .NET and ASP .NET MVC applications. I gained my knowledge by creating both academic and my own projects. Besides all the academic activities, I am still learning and widening my skills on my own by reading books and blogs for software developers, participating in Pluralsight online courses and nding solutions to any programming problems on Stackoverow.com. When developing software, I try not only to create the code that works, but do it in a good manner, using proven programming practices and taking care of code quality. I am currently running two websites: http://testyourenglish.pl and http://quizmaniak.pl. First of them is a service with English tests for Polish students where they can solve free exercises of diversied diculty as well as participating by adding new tests for others. The second website is a platform for solving and creating original educational and entertainment quizzes. Developing both websites makes me face the users needs and react accordingly, which may be benecial in cooperating with open source community. Some of my other projects, together with code samples, are available on my portfolio website http://pdowgiallo.pl (in Polish).
1 http://en.wikipedia.org/wiki/Engineer%27s_degree#Poland.2C_Czech_Republic_and_Slovakia

As for MonoDevelop, I have already started investigating the source code, got familiar with MD code style and read articles for developers. I also posted on Monodevelop-devel mailing list to ask about the details of Razor parser project. As a result of my playing with the existing code, I authored a new MVC 3 project template, based on existing one, with updated references and conguration les. The source les and sample project which uses a Razor view can be seen on http://pdowgiallo.pl/mvc.html. This template should not be treated as an completed work, because it was tested only on Windows and may lack some important features, but creating it helped me understand better the whole process of developing new add-ins and expanding the existing ones. I think I would be appropriate candidate to be one of your GSoC students. Although I have not work for any OSS projects yet, I am very enthusiastic about the job and can guarantee that I would do it as best as I can. Creating and developing my own websites that I mentioned earlier proves that I can successfully nish even complex projects. The tasks that I choose to accomplish are of great importance, because they will help other developers work more eciently. Some of the features I plan to implement seem challenging, but it only makes them more interesting. For me it will be a great opportunity to get valuable experience and learn from better programmers.

Communication

Emails: sparekd@gmail.com, dowgiallo.piotr@gmail.com Skype: p.dowgiallo Portfolio: http://pdowgiallo.pl

Conrmation

I conrm that I have read the Mono rules of contribution and that GSoC will be my primary activity for the summer. I will commit code at least once a week for review and discussion with my mentor. I will submit status report on a weekly basis. I hope I have included all the needed details to present my ideas for GSoC 2012. In case of any questions, feel free to ask.

Anda mungkin juga menyukai