26

Re: API and puff architecture

Hello, Arsen. Shnurkov, you wrote: S>> the Citation . AS> 2.1 PROGRESSIVE FRAMEWORKS AS> Designing a single framework for a broad range of developers, scenarios, and languages is a difficult and costly enterprise. So, allow to formulate the thoughts more accurately somehow at last. And that suddenly you are confused. At first you (referring on FDG) said that at design  it is necessary to consider as much as possible wide spectrum of tasks of potential users. Turns to the citation which I did not result and which also is understood incorrectly. AS> but specify that if  progressive scenarios it covers as a rule much. ... Generally there it is told about passage from separate dedicated  (mfc/atl, as an example) to  as to a platform which includes different dial-ups API for different tasks. I.e. The spanning latitude is not separate API-vsemogutor, and possibility to use in one application different API from different  without special problems since they are fulfilled in the general architectural style. The main drawback 3 is that the multitude of frameworks makes it difficult for developers using one of the frameworks to transfer their knowledge to the next skill level or scenario (which often requires a different framework). For example, when there is a need to implement a different application that requires more powerful functionality, developers hit a very steep learning curve, because they have to learn a completely different way of programming, ______ 3Other drawbacks include slower time to market for frameworks that are wrappers on top ofother frameworks, duplication of effort, and lack of common tools. AS> so, a current state of arguing: And, as usual - from each side looks on the For all participants I will not tell, but at least I precisely any   "you the little fool" was not going to do, if so have been perceived - my apologies. Seriously, . About remaining - yes,  it is difficult. Not in that sense difficult that "you do not know - do not climb and do not try at all", it is stupidity full. Here any designer API in identical conditions will be. Sense that at the initial stage it is very easy to commit errors which then and remain. Or, at the best, simply to make a heap of operation on burst. Therefore before "to do something" it is necessary to be defined, what exactly should turn out as a result and lead preliminary investigation. If such approach is not pleasant, it is possible to look at alternative - designing from patterns - but it already to . And here to be defined at us chronically it is impossible, not in the last instance that write you one and you perceive absolutely another. Seriously. Formulate at last the answer to a simple question: what key scenarios of usage at the future . I not about separate features, and about problems which with its help can be solved, a typical template "that am-that it is necessary-restriction" in last post wrote. After that it will be already possible to be defined by what to take for a basis - all from zero,  the project, or simply dial-up of helpers over library and already then to reflect on architecture.

27

Re: API and puff architecture

Hello, Arsen. Shnurkov, you wrote: AS> dependence Presence easily I will define - I will see in.csproj element Reference instead of ProjectReference. AS> That is for dependence it is written down in.csproj for determination of presence of dependence.sln it is not necessary. A dirty trick did not note. A project name - B. The name of a binary file for this project - somelib.dll, and at separate esthetes it also from build conditions depends. Without analysis of dependences in sln-files correctly to compare dependences even in averages  from pair hundreds  is that still . In general.sln it is necessary  is mandatory. And that on the first draft copy which have been not included in  all breaks off. AS> if to me give a technique for.csproj, AS> that for.sln.nuspec.package and.config I will apply it on-analogy. How to protect formatting at record of xml-documents? Here precisely I remember that there there was any dirty trick, will look. Here it for a basis + XmlWhitespace and IXmlLineInfo for formatting of new tags / attributes.

28

Re: API and puff architecture

S> also it is understood incorrectly. S> I.e. latitude of spanning It in this place, and still there is other place: DO understand and explicitly design for a broad range of developers with different programming styles, requirements, and skill levels.... Therefore the Word team puts in many more features that my mom might find helpful rather than the features the development team finds helpful. Well here I also try to make such  that he solved tasks which to me seem useful basically, and not just what are necessary in the nearest two weeks. Examples of the tasks, which decision should provide : 1) it is given.csproj and wishes on its change (in any format, for example as API calls). It is necessary to generate a patch in format RFC 5261 (I do not remember number precisely, in general is RFC on XML Diff) the minimum size with the minimum quantity of operations 2) to generate a normal patch for diff the minimum size 3) simply to change immediately.csproj csproj, generating a difference minimum (instead of  all indents in all file) Already over it I be going to screw a DB nupkg and all remaining logic on downloading of archives, , to the analysis nuspec, to downloading of source codes, additional files with meta data, to change and update of dependences and it in scope  does not enter. Current tools do not give possibilities for pointwise changes. These are partite small  - or only for XML, or only for build items etc.

29

Re: API and puff architecture

S> a project Name - B. The name of a binary file for this project - somelib.dll yes does not soar me it. And I already wrote why. Because solutions I and so I read at first, and in the second - my task to disassemble a repository on separate projects instead of to collect. It gathers then itself because dll rise in GAC and are through Reference, which I to a propatch. And each project will gather irrespective of the.sln

30

Re: API and puff architecture

S> XmlDocument. PreserveWhitespace = true; + XmlWhitespace and IXmlLineInfo for formatting of new tags / attributes. In the same place it is written that in accuracy all the same it is impossible, because layout of attributes concerning an element can be changed. Mind that PreserveWhitespace preserves only elements indentation. If you have attributes in new lines or multiline values they will be reformatted. Still is SaveOptions. DisableFormatting, it is necessary to try... But say that it is necessary to rewrite XmlWriter: I believe that LoadOptions. PreserveWhitespace and SaveOptions. DisableFormatting only instruct XDocument on how to handle whitespace in terms of indentation and the content of text nodes. It would still normalize the attributes, etc. You may wish to use an overload where you specify an XmlWriter that is configured to do what you want, and if you cannot find a configuration that works with the default XmlTextWriter, you could always create your own XmlWriter. http://www.codeproject.com/Articles/730 … System-Xml XDocument. Save has a SaveOptions argument which can be set to disable formatting. This has the same effect as putting the XmlWriterSettings "Indent" property to "false" At me the thought was - time  serves for creation of editors different  to learn to describe .csproj for Roslyn as platforms.

31

Re: API and puff architecture

Hello, Arsen. Shnurkov, you wrote: AS> Examples of the tasks, which decision should provide : About, well so it turns out is much more interesting. The amusing piece should quit if not a secret, for what? It any more within the limits of a subject, simply curiously. Here that I can precisely prompt is a saving of formatting at editing. Here two variants. Or we use XDocument with preserve whitespace = true + we place XmlWhitespace for new tags / attributes, or if the document entirely cannot be kept in the memory, we fence the visitor over pair xml reader + xml writer, as all in the same XDocument. All remaining is already on your choice. I would pay attention to the following: 1. Semantic model for csproj and other xml-based formats. It helps you, but is not so strong, since * csproj many freedoms, here it for example -  a file <Project ToolsVersion = "14.0" xmlns = "http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <ProjectGuid> {0C3FD4CB-7665-4ADF-8F18-E039DCDBEC74} </ProjectGuid> <OutputType> Exe </OutputType> <OutputPath> bin\Debug \</OutputPath> </PropertyGroup> <ItemGroup> <Compile Include = "Program.cs"/> </ItemGroup> <Import Project = "$ (MSBuildToolsPath) \Microsoft allow. CSharp.targets"/> </Project> * the heap of dependences can be disassembled incorrectly, especially if they are marked as conditional symbols or hidden in Import. In general if to do - look, as the typified tags in OpenXml SDK (by successors from XElement) are made. Something more difficult will look  2. Handling csproj a xml-patch. It will be good to work only provided that csproj it was not corrected cardinally. Well and besides, something I will not remember ready implementation of this business on . Perhaps to refuse this functional and at once to transform wishes on project change into the code which corrects xml / semantic model?

32

Re: API and puff architecture

S> something I will not remember ready implementation of this business on . https://github.com/Bonuspunkt/XmlPatch

33

Re: API and puff architecture

Hello, Arsen. Shnurkov, you wrote: S>> something I will not remember ready implementation of this business on . AS> https://github.com/Bonuspunkt/XmlPatch And it is an oak variant just, without formatting saving. In general here three variants to unwinding : * or generally to hammer on formatting of attributes (aha, in it there was a dirty trick, thanks that reminded), * or to do a megaperversion - to pull out the element beginning-end through XmlLineInfo and to replace the text in between with new value. * or to fence the logic atop xmlReader with storage of positions of elements, inverted commas (aha, single are replaced on double) and a heap of other things. UPD it is still fashionable  kirill osenkov, it did in due time a parcer xml on basis  To us in due time the first variant since csproj-files are rarely formatted by a non-standard method sufficed.

34

Re: API and puff architecture

S> a parcer xml It can be and a parcer, but is not so similar on API for change. Nodes there ,  I do not see as by means of this library... We Admit it is necessary to transform Reference in ProjectReference. That is one node to delete, another (into other place) to interpose. And that?

35

Re: API and puff architecture

Hello, Arsen. Shnurkov, you wrote: AS> It can be and a parcer, Well so I knowingly told about " kirill osenkov" It at least prompts where to dig. In studio bowels xaml lang services it is exact on roslyn, about xml it is not assured.

36

Re: API and puff architecture

S> Something more difficult will look  And more difficult it is necessary. Because evidently there are two abstraction layers - simply projects msbuild and is is specific  projects, at them, for example, there are configurations to names. And names of configurations it is important.

37

Re: API and puff architecture

Hello, Arsen. Shnurkov, you wrote: AS> Because evidently there are two abstraction layers - simply projects msbuild AS> and is is specific  projects, at them, for example, there are configurations to names. And names of configurations it is important. Configurations work with any of msbuild-projects and is not mandatory. I above gave an example a csproj-file without configurations.  configs / SolutionConfigurationPlatforms and ProjectConfigurationPlatforms in a.sln-file - only one of methods. By the way, and than  workspace do not approach, VisualStudioWorkspace and MSBuildWorkspace which? https://joshvarty.wordpress.com/2014/09 … orkspaces/ from this that I can recall - unless here this bug can prevent https://github.com/dotnet/roslyn/issues/5959