Тёмный
No video :(

PowerShell Quick Tip: Module Dynamic Function Loading 

Bryan Cafferky
Подписаться 41 тыс.
Просмотров 2,6 тыс.
50% 1

PowerShell script modules are awesome but they have one big issue. You have to include all the functions in one ginormous script. Note good for code maintenance. In this short presentation, I'll show you how to solve this problem and get maximum reuse while preserving maintainability.
Code at: github.com/bcafferky/shared/t...

Опубликовано:

 

6 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 7   
@fredfranco6569
@fredfranco6569 Год назад
Love these videos, but I wish you would close the command window on the right.
@bartbtsful
@bartbtsful 5 лет назад
Simple but effective!
@funkmastaz9805
@funkmastaz9805 5 лет назад
Why do you use this method over declaring "NestedModules" in the manifest? After a couple hours of research, it seems that this topic is quite divisive in the PowerShell community and there isn't one "best practice." I'm leaning towards your approach because of its simplicity but there are strong both for and against dot sourcing.
@BryanCafferky
@BryanCafferky 5 лет назад
This is not nesting modules, it is a simple way to make source code maintenance easier. Each function is in its own file so they can be checked in and out of a source code mgt system separately. I think whatever enhances code maintenance and deployment while helping reduce bugs is a good idea.
@timothywestern6488
@timothywestern6488 4 года назад
"consider maybe someone made some changes to that file that you don't know about" Uhm. if the point is to have reusable modules, and you have people making changes and not persisting them in source control, that's a barrier to being able to have reproduceable results. Use the source control and code in a way that things are flexible.
@timothywestern6488
@timothywestern6488 4 года назад
btw the load/reloading thing is a bit of a pain, I agree on that point.
@BryanCafferky
@BryanCafferky 4 года назад
Thanks for commenting. Sure. Using source code control should be standard practice. However, my point was to showcase a technique to break out the functions into separate source files. This makes it easier to read the code and isolate where you need to make changes.
Далее
PowerShell Development:  Querying SQL Server
16:15
Просмотров 11 тыс.
PowerShell Modules
25:01
Просмотров 12 тыс.
PORTAL SPAMMER🤬🤬🤬| Doge Gaming
00:19
Просмотров 2 млн
Я тоже так могу
00:12
Просмотров 1 млн
Склеил девушку-курьера ❤️
01:00
Interview with a Senior Python Developer - Part1
4:57
Просмотров 793 тыс.
What to Learn for Your Career Path
16:53
Просмотров 1,3 тыс.
Stop, Intel’s Already Dead!
13:47
Просмотров 468 тыс.
Common misunderstandings about Functional Programming
4:21
PowerShell Functions
36:06
Просмотров 42 тыс.
Python Virtual Environments & The Facts of Life
22:59
Просмотров 1,4 тыс.
Building a PowerShell Module from Scratch
30:02
Просмотров 7 тыс.
PORTAL SPAMMER🤬🤬🤬| Doge Gaming
00:19
Просмотров 2 млн