Have you seen code fragment like this? I mean there are lot of interfaces that provide stringly-typed access to some of the internals of the entity. This particular code fragment could be seen a lot in EPiServer Relate+ product code samples. var instance = new SampleType (); instance.SetAttributeValue...
Nesen Microsoft laida klajā Visual Studio 11 Developer Preview, kas paredzēts dažādiem agrīnās programmas interesentiem, kuri neskatoties uz pieļaujamajām kļūdām un runtime exception studijas darbošanās laikā, tāpat instalē, pēta un skatās, ko Microsoft ir šoreiz saražojis un ko jaunu piedāvā. Āri Team...
Ir pagājis jau krietns laiciņš kopš veicu code-review laiku pa laikam. Sākumā bija doma pierakstīt katru atrasto lietu un apskatīt to sīkāk, bet ar laiku entuziasms noplaka nedaudz, bet nu gala rezultātā esmu tomēr apkopojis septiņas visizplatītākās kļūdas vai nianses, kas atkārtojas no code-review uz...
Oriģinālliteratūra: “ Principle refers to a specific form of decoupling where conventional dependency relationships established from high-level, policy-setting modules to low-level, dependency modules are inverted (i.e. reversed) for the purpose of rendering high-level modules independent of the...
Oriģinālliteratūra: “ The Interface Segregation Principle (ISP) states that clients should not be forced to depend on methods they do not use. ” Šo principu ir pavisam vienkārši interpretēt un viegli ievērot: klientam, kas lieto komponenti, kuras autori esam mēs, nedrīkstam...
Orģinālliteratūra: Liskov Substitution Principle (LSP) states that subtypes must be substitutable for their base types. “L” burts patiesībā nāk no šī programmatūras dizaina principa autores – Barbara Liskov! Nez kāpēc, bet man pēc nosaukuma šķiet, ka autoram bija jābūt...
Labā prakse veidojot dažāda izmēra un sarežģītības bibliotēkas ir paredzēt dažādus diagnostikas slotus jeb veidu, kādā iespējams notestēt, pārbaudīt un verificēt, ka sistēma vai modulis strādā korekti. Nesen, veidojot savas aplikācijas biznesa loģikas moduli, saskāros ar problēmu, ka ir funkcionalitāte...
Zinātniskā literatūra Open/Closed Principle raksturo šādi: The Open/Closed Principle states that software entities (classes, modules, functions, etc.) should be open for extensions, but closed for modification. Tātad par ko šis princips mums liek domāt? Sistēmas uzbūve un koda konstrukcijas...
“S” apzīmē - The Single Responsibility Principle (SRP) . The S ingle Responsibility Principle states that every object should have a single responsibility, and that responsibility should be entirely encapsulated by the class. Tātad šis pagalvojums definē to, ka klasei ir ieteicams...